next up previous contents index
Next: The While..do statement Up: Statements controlling program flow. Previous: The If..then..else statement

The Repeat..until statement

The prototype of the Repeat..until statement is

Repeat
  Statement1;
  Statement2;
Until Expression;
This will execute Statement1 etc. until Expression evaluates to True. Since Expression is evaluated after the execution of the statements, they are executed at least once.

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