In Control flow§
See primary documentation in context for while, until
The while
statement executes the block as long as its condition is true. So
my = 1;while < 4print "\n";# OUTPUT: «123»
Similarly, the until
statement executes the block as long as the expression is false.
my = 1;until > 3print "\n";# OUTPUT: «123»
The condition for while
or until
can be parenthesized, but there must be a space between the keyword and the opening parenthesis of the condition.
Both while
and until
can be used as statement modifiers. E. g.
my = 42;-- while > 12
Also see repeat/while
and repeat/until
below.
All these forms may produce a return value the same way loop
does.