Previous PageNext Page

7.5.18 while Statement

Executes a statement until a specified condition is False.
 

Syntax

while (expression)

statement

expression
A Boolean expression checked before each iteration of the loop. If expression is True, the loop is executed. If expression is False, the loop is terminated.
statement
The statement to be executed if expression is True. Can be a compound statement.

Remarks

The while statement checks expression before a loop is first executed. If expression is False at this time, the loop is never executed.
 

Copyright © 2000 Chili!Soft

Previous PageTop Of PageNext Page