learningprocessing.com icon indicating copy to clipboard operation
learningprocessing.com copied to clipboard

06_04_global_vc_local.pde line 28

Open computermusic opened this issue 8 years ago • 1 comments

// Exercise 6-4: Predict the results of the following two // programs. Test your theory by running them.

/* //SKETCH #1: Global "count" int count = 0;

void setup() { size(200,200); }

void draw() { count = count + 1; background(count); }


//SKETCH #2: Local "count"

void setup() { size(200,200); }

void draw() { int count = 0; count = count = 1; // This line is a mistake. background(count); }


*/

computermusic avatar Aug 12 '17 17:08 computermusic

yes i agree

onebigear avatar Oct 17 '17 19:10 onebigear