The Repeat Statement

Syntax

$ RepeatStatement = REPEAT StatementSequence UNTIL expression ";"

Description

The Repeat statement provides the enclosed statements sequence cycling. The statement executes a cycle of statements sequence till the expression value equals to TRUE. The expression value is checked after the sequence is executed. It should be compatible with the Boolean type.

Example

Sub RepeatSample;

Var

a, b, c: Integer;

Begin

a := 1;

b := 4;

c := 2;

Repeat

b := b + b * 5 - 25 * c - 3;

a := a + 1;

Until a = 10

End Sub RepeatSample;

See also:

Statements