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