Previous PageNext Page

7.5.5 do...while Statement

Executes a statement block once, and then repeats execution of the loop until a condition expression evaluates to false.
 

Syntax

do

statement

while (expression) ;

statement
The statement to be executed if expression is True. Can be a compound statement.
expression
An expression that can be coerced to Boolean True or False. If expression is True, the loop is executed again. If expression is False, the loop is terminated.

Remarks

The value of expression is not checked until after the first iteration of the loop, guaranteeing that the loop is executed at least once. Thereafter, it is checked after each succeeding iteration of the loop.
 

Copyright © 2000 Chili!Soft

Previous PageTop Of PageNext Page