Possible bug: Arrays in text()
in
Programming Questions
•
1 year ago
I was cleaning up code from a timer program when I ran into an issue. I can reproduce it with the following short code.
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;
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.
- 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);
- }
- 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.
1