7.5

Table Of Contents
Related topics:
l "If (function)" (page 554)
Repeat... Until (procedure)
Repeat a sequence of commands until a condition is true. It is similar to a for... endfor loop in that you can nest the loops. It is
different from a for... endfor loop in that the loop always executes at least once, and that you tie the number of times the
loop repeats to a Boolean condition. For example you might tie the number of times the loop repeats to the occurrence of a
piece of data in the data stream.
Syntax
repeat
until( expression )
Argument
expression
Boolean value. If it evaluates to true, the loop ends. If it evaluates to false, the loop repeats.
Code Sample Example
This example prints the string Cheers’ ten times, one underneath the other, with a dashed line above and below the ten
instances.
Example
show('---------------')
crlf(0.16)
&count := 1
repeat
&count := &count + 1
show('Cheers')
crlf(0.16)
until(&count = 10)
show('---------------')
crlf(0.16)
©2010 Objectif Lune Inc - 629 -