Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
oldbic
oldbic'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
unreacheable code
[5 Replies]
24-Sep-2012 09:54 AM
Forum:
Programming Questions
i need to have an endless loop not using draw()...
this code :
size(200, 200);
int cols = width;
int rows = height;
// Declare 2D array
int[][] myArray = new int[cols][rows];
while (true) {
// Initialize 2D array values
for (int i = 0; i < cols; i++) {
for (int j = 0; j < rows; j++) {
myArray[i][j] = int(random(255));
}
}
// Draw points
for (int i = 0; i < cols; i++) {
for (int j = 0; j < rows; j++) {
stroke(myArray[i][j]);
point(i, j);
}
}
}
give me a warning: unreacheable code... why?
«Prev
Next »
Moderate user : oldbic
Forum