Repeat Statement

Executes Statements repeatedly until a specified bool-exp is true.

Syntax

Repeat

Statements

Until bool-exp

Comments

After Statements are executed, the bool-exp is evaluated. If the result is False, control is transferred to the statement following the Repeat... Until statement. Otherwise, the Repeat... Until statement is executed again.

Example

i=0

Repeat

i=i+1

Print i;

Until i > 4

! i is now 5

! This will print 1 2 3 4 5

See Also

Continue, Exitloop, Expressions, For, Loop, While