Prev Up
Go backward to If Statements
Go up to Statements

While Statements

< while statement > -> while < expression > do
< statement list >
end ;

The execution of a while loop begins with the evaluation of the expression included in the statement's header. If this expression's value is zero, execution of the while loop terminates immediately. Otherwise, the statement list included is executed repeatedly until the value of the expression becomes zero.


Computer Science 434
Department of Computer Science
Williams College

Prev Up