Login  Register

continue in if

Posted by Colin Sturm on Apr 02, 2007; 8:54pm
URL: http://imagej.273.s1.nabble.com/save-summary-file-tp3699878p3699881.html

Is there a way to continue to the next iteration of a for loop if a
criteria is met?
I tried using continue; but didn't work.

Ex:
for (i=1; i<=8; i++){
    if(i==5)
          continue;
    print(i);
}

So the desired output would be:
1
2
3
4
6
7
8

Thanks