REM Example while loop - press the button 5 times
VAR $FOO = 5
WHILE ( $FOO > 0 )
STRINGLN Press the button...
WAIT_FOR_BUTTON_PRESS
$FOO = ( $FOO - 1 )
END_WHILE
STRINGLN You pressed the button 5 times!
REM The variable $FOO is set to 5.
REM The code block within the WHILE loop will be repeated until the expression evaluates to FALSE.
REM For each run of the code block, the message "Press the button..." is typed. The payload then waits until it detects the button is pressed, at which point the variable $FOO is decremented.