repeat
while
condition
statementList
lastly
then
else
statementList
end
repeat
Condition is an expression that always yields true
or false
.
put one into x repeat while x <= 10 put x add 1 to x end repeat
The repeat while
structure causes all the statements inside to execute in a loop repeated as long as the condition is true
. The condition is checked preceding each iteration of the loop. The statements inside are not executed if the condition is false
at the beginning of the loop.
In OpenXION 1.3 and later, the statements under a lastly
, then
, or else
keyword inside a repeat
structure will be executed when the loop ends, unless the loop has ended because of an exit
, pass
, return
, or throw
.