
2 Loop Constructs
2.1 About loop constructs
This chapter describes the constructs that the Loop Facility provides. The descriptions are organized according to the functionality of the constructs. Each section begins with a general discussion of a particular operation; it then presents the constructs that perform the operation.- Section 2.2, "Iteration control" describes iteration control clauses that allow directed loop iteration.
- Section 2.3, "End-test control" describes clauses that stop iteration by providing a conditional expression that can be tested after each execution of the loop body.
- Section 2.4, "Value accumulation" describes constructs that accumulate values during iteration and return them from a loop. This section also discusses ways in which accumulation clauses can be combined within the Loop Facility.
- Section 2.5, "Variable initializations" describes the
with
construct, which provides local variables for use within the loop body, and other constructs that provide local variables. - Section 2.6, "Conditional execution" describes how to execute loop clauses conditionally.
- Section 2.7, "Unconditional execution" describes the
do
andreturn
constructs. It also describes constructs that are used in the loop prologue and loop epilogue respectively. - Section 2.8, "Miscellaneous features" discusses loop data types and destructuring. It also presents constructs for naming a loop and for specifying initial and final actions.
- Section 2.9, "Advanced iteration" describes iteration over sequences, as well as over arrays, hash keys and values, and package symbols.
- Section 2.10, "User extension" discusses methods for extending the Loop Facility's iteration capabilities.
- Section 2.11, "Backward compatibility" discusses the loop construct
nodeclare
and certain hash table methods used for backward compatibility with other loop syntaxes. It also lists function and method names that are obsolete in the Loop Facility and gives their replacements.
The Loop Facility - 9 SEP 1996

Generated with Harlequin WebMaker