Skip to content

Commit 971576d

Browse files
author
SimonePDA
authored
Merge pull request #367 from per1234/fix-goto-bug
Fix bug in goto example code
2 parents b2da436 + f17dbb2 commit 971576d

File tree

1 file changed

+1
-1
lines changed
  • Language/Structure/Control Structure

1 file changed

+1
-1
lines changed

Language/Structure/Control Structure/goto.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ goto label; // sends program flow to the label
4646
[source,arduino]
4747
----
4848
for(byte r = 0; r < 255; r++){
49-
for(byte g = 255; g > -1; g--){
49+
for(byte g = 255; g > 0; g--){
5050
for(byte b = 0; b < 255; b++){
5151
if (analogRead(0) > 250){ goto bailout;}
5252
// more statements ...

0 commit comments

Comments
 (0)