FutureBasic Logo

<<    Index    >> FutureBasic 5

do   statement

do [statementBlock] until expr

The do statement marks the beginning of a "do-loop," which must end with an until statement. statementBlock represents a block of zero or more executable statements, possibly including other do-loops. When a do statement is encountered, FutureBasic executes the statements (if any) in statementBlock, and then evaluates expr. If expr is zero, then the process is repeated. The statements in statementBlock are repeatedly executed until expr evaluates to a nonzero value, at which point the loop exits and the next statement after until is executed. Typically, expr is an expression involving logical operators, which is evaluated either as _zTrue (-1) or _false (0). See the if statement for more information about expr.
Note that the statements in statementBlock always executed at least once. If you want to use a looping structure which may possibly skip over the statementBlock without executing it, consider using a while/wend loop.

See Also:
for...next; while...wend; if