Language:
Русский
English
while (reserved word)
A while statement contains an expression that controls the repeated execution of a singular or compound statement.
Syntax
while expression do statement
Remarks
The statement after do is executed repeatedly as long as the Boolean expression is True.
The expression is evaluated before the statement is executed, so if the expression is False at the beginning, the statement is not executed.
Example
{ "while" statements }
while Ch = ' ' do Ch := GetChar;
while not Eof(InFile) do
begin
ReadLn(InFile, Line);
WriteLn(OutFile, Line);
Inc(LineCount);
end;