Copyright © 1996, 1997 Lucent Technologies Inc. All rights reserved.

9.5 Simple looping statements

The simple looping statements are


labelopt while ( expressionopt ) statement labelopt do statement while ( expressionopt ) ;
In both cases the expression must be of type int. In the first form, the expression is first tested against 0; while it is not equal, the statement is repeatedly executed. In the second form, the statement is executed, and then, while the expression is not 0, the statement is repeatedly executed. If the expression is missing, it is understood to be non-zero.

05/Jun/97