The Repeat statement executes embedded statements one or more times depending on a condition.
repeat-statement:
Repeat block Until boolean-expression
The statement is executed as follows:
Control is transferred to the embedded statement block.
When the end point of embedded statement block is reached, the expression specified in the condition is calculated. If the expression value is False, control is transferred to the beginning of the statement. Otherwise, control is transferred to the end point of the statement.
Within the embedded statement block of the Repeat statement one can use the Break statement to immediately transfer control to the end point of the Repeat statement, and the Continue statement to transfer control to the end point of the embedded statements.
Private Sub TestRepeat();
Var
b: boolean;
Begin
Repeat
//Code executed in cycle
If < Condition for exiting loop > Then
b := True;
End If;
Until b;
End Sub;
See also: