PS TEXT FORMAT Reference Manual
Introduction to TFORM
3–94 11387 Tandem Computers Incorporated
LOOP The LOOP construct lets you perform repeated actions such as executing
the same commands and/or writing the same text the number of times you
specify. The LOOP construct also has command options for immediate
restarting or immediate termination of the loop.
What to Enter
\LOOP [
exp
]
. . .
commands and/or text
. . .
[ \NEXTLOOP ]
. . .
commands and/or text
. . .
[ \EXITLOOP ]
. . .
commands and/or text
. . .
\ENDLOOP
Examples:
A simple application of the LOOP construct is to create a space for a piece
of art. In this example, the text, FIG.2_HERE is printed 12 times, once on
each line.
\ASSIGN art_space "FIG.2_HERE"
\LOOP 12
\(
art_space
\)
\ENDLOOP
The ASSIGN command tells TFORM to store the string “FIG.2_HERE” in
the variable
art
_
space
. TFORM prints the term 12 times in a vertical
column, creating a labeled space for the piece of art.