Next: , Previous: , Up: Loop   [Contents][Index]


15.25.7 End-Test Control

Loop Termination Constructs

The loop keywords

designate constructs that use a single test condition to determine when loop iteration should terminate.

Specific Values to Return

The constructs

provide specific values to be returned when a loop terminates. Using these with value-returning accumulation clauses can produce unpredictable results.

No Specific Values to Return

In all other respects these constructs behave like the

constructs.

The macro loop-finish can be used at any time to cause normal termination. In normal termination, ‘finally’ clauses are executed and default return values are returned.

End-test’ control constructs can be used anywhere within the loop body. The termination conditions are tested in the order in which they appear.