$ WhileStatement = WHILE expression DO StatementSequence END WHILE ";"
The While statement provides enclosed statements sequence cycling. The statement executes the statements sequence while the expression value is TRUE. The expression value is checked before the sequence execution starts. It should be compatible with the Boolean type.
Sub WhileSample;
Var
a, b, c: Integer;
Begin
a := 1;
b := 4;
c := 2;
While a < 10 Do
b := b + b * 5 - 25 * c - 3;
a := a + 1;
End While;
End Sub WhileSample;
See also: