While Statement

Acts as a loop that repeats the statements in StatSeq until the expression Expr becomes false.

Syntax

Stat = "while" Expr "do" StatSeq "end".

Example

dcltrans
transaction TMain
var
I : number;
a : array [100] of number;
begin
I := 1;
while I <= 100 do
a[i] := I;
I := I+1
end;
end TMain;