The conditional clause (cont'd)
(Display Figure 10.)
The expression that you place in the conditional clause will be evaluated to determine:
- If the code in the body of the loop
structure will be
executed one time, or
- If the loop structure will terminate.
If the expression in the conditional clause evaluates to true:
- The code in
the body of the loop will be executed once (and only once).
- Then the test will be repeated.
If the expression in the
conditional clause evaluates to false:
- The loop will terminate immediately
causing:
- The code in the body of the loop to be skipped and
- The next
statement following the body of the loop to be executed.