Skip to content

Commit 970cc19

Browse files
committed
Improve use of comments in exercise 6-4
Both sketches start out wrapped by a multi line comment, so they are disabled by default. Removing the multi line comment around a sketch will enable it. The line where the student is supposed to type the answer (indicated by underscores ________) is now a single line comment. The underscores will thus no longer prevent either of the sketches from running by producing an unexpected token error.
1 parent 264fd67 commit 970cc19

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

chp06_loops/exercise_06_04_global_vs_local/exercise_06_04_global_vs_local.pde

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ void draw() {
1717
count = count + 1;
1818
background(count);
1919
}
20-
________
21-
22-
20+
// ________
2321
*/
22+
23+
/*
2424
//SKETCH #2: Local "count"
2525
2626
void setup() {
@@ -32,6 +32,5 @@ void draw() {
3232
count = count + 1;
3333
background(count);
3434
}
35-
/*
36-
________
35+
// ________
3736
*/

0 commit comments

Comments
 (0)