Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
mrcake
mrcake's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Possible bug: Arrays in text()
[2 Replies]
22-Sep-2012 10:25 PM
Forum:
Programming Questions
I was cleaning up code from a timer program when I ran into an issue. I can reproduce it with the following short code.
int[] t=new int[6];
void setup(){
size(300,100);
}
void draw(){
textSize(60);
text(t[5]+t[4]+":"+t[3]+t[2]+":"+t[1]+t[0],25,50);
}
The sixth element of the array "t[5]" doesn't display. However if I add an empty character to line 7 it shows up, as in;
text(""+t[5]+t[4]+":"+t[3]+t[2]+":"+t[1]+t[0],25,50);
Known issue? Feature? Is there a better way to do this? I'd search the forums more but it's past 1AM here, time to sleep.
«Prev
Next »
Moderate user : mrcake
Forum