tototototototot

All posts in Statements

The continue statement and labels

The continue statement skips the rest of the code inside a loop and starts at the beginning of this loop as if the end of the loop had been reached normally. Thus, the code after the continue statement in the code below will never get executed by flash: [sourcecode language=’cpp’] for(var i:int = 0 ; […]

Break statement and labels

The break statement allows us to skip the execution of a loop or statement: [sourcecode language=’cpp’] for(var i:int = 0 ; i < 10 ; i++) { if ( i >= 5 ) { break; } } [/sourcecode] Simple. Now imagine we have a loop nested in another loop: [sourcecode language=’cpp’] for(var i:int = 0 […]