next up previous contents index
Next: The With statement Up: Statements controlling program flow. Previous: The Repeat..until statement

The While..do statement

The prototype of the While..do statement is

While Expression Do
  Statement;
This will execute Statement as long as Expression evaluates to True. Since Expression is evaluated before the execution of Statement, it is possible that Statement isn't executed at all.

Statement can be a compound statement.

Be aware of the fact that the boolean expressions Expression1 and Expression2 will be short-cut evaluated. (Meaning that the evaluation will be stopped at the point where the outcome is known with certainty)



Michael Van Canneyt
Thu Sep 10 14:02:43 CEST 1998