Page 1 of 1

break but continue

Posted: Sat Nov 19, 2005 6:06 pm
by shiznatix
in a loop i check a condition, if $var = 'whatever' then i want it to skip that loop cycle and start the loop on the next object. is there a command to do this?

Posted: Sat Nov 19, 2005 6:07 pm
by Jenk

Posted: Sat Nov 19, 2005 6:09 pm
by Chris Corbyn
Huh? :?

There's the "continue" keyword just like "break". Your question is kinda hard to figure out :P You been smoking something special again? ;)

Posted: Sat Nov 19, 2005 6:56 pm
by shiznatix
continue is the trick, thanks mates.

Posted: Sat Nov 19, 2005 8:30 pm
by dethron
and also (to remind you) if you want to stop the loop and continue to rest of the code : "break" will do another trick ;)