PS TEXT FORMAT Reference Manual
Introduction to TFORM
3–96 11387 Tandem Computers Incorporated
How to Use the LOOP Construct
The different commands of the LOOP construct are described in the
following paragraphs.
LOOP
exp
LOOP
exp
specifies that TFORM is to format all the text and/or
execute all the commands that appear between the LOOP command
and the following ENDLOOP command,
int
times. You must provide
TFORM with an expression that evaluates to
int
; it can be of any
numeric type, but TFORM truncates any fraction to produce an integer.
NEXTLOOP
If you include a NEXTLOOP command within a loop (which is the only
place it can appear), TFORM immediately jumps back to the preceding
LOOP command and starts the next iteration of the loop.
EXITLOOP
If you include an EXITLOOP command within a loop (which is the only
place it can appear), TFORM immediately terminates the loop and
proceeds to the command or line of text that follows the next
ENDLOOP command.
ENDLOOP
The ENDLOOP command terminates the LOOP construct. A loop must
always end with this command.