break
Purpose
Break out of a loop early
Description
Stop a loop from repeating before the exit condition is met
Syntax
while condition loop ... break ... repeat // Loop while condition is true or BREAK is executed
Arguments
condition boolean condition that stops the loop when false
Example
loop
c = controls( 0 )
printAt( 0,0, "Press A to exit program" )
if c.a then
break
endIf
update()
repeat
Associated Commands