This document covers the following topics:
For explanations of the symbols used in the syntax diagram, see Syntax Symbols.
Belongs to Function Group: Reporting Mode Statements
LOOP statement is used to close a processing loop. It
causes processing of the current pass through the loop to be terminated and
control to be returned to the beginning of the processing loop.
When the processing loop for which the
LOOP statement is
issued is terminated (that is, when all records have been processed or
iterations have been performed), execution continues with the statement after
LOOP statement is used with the following statements:
A field within a view may be referenced outside the processing loop by using the view name as a qualifier.
This statement is for reporting mode only.
Statement Reference Notation:
LOOPstatement, will be closed automatically by an
LOOPstatement. But with respect to good coding practice, you are not recommended to do so.
FIND ... READ ... READ ... LOOP (0010) /* closes all loops
FIND ... READ ... READ ... LOOP /* closes loop initiated on line 0030 LOOP /* closes loop initiated on line 0020 LOOP /* closes loop initiated on line 0010