Pathmaker Reference Manual
Macro Definition and Commands
Macro Language
067869 Tandem Computers Incorporated 3–9
ITERATE Use ITERATE to process a designated set of lines again and again, a specified number
of times, using a predefined variable, known as a construct, in a specific context.
% ITERATE
construct-variable
THRU
scope
construct-variable
specifies a construct variable predefined by Tandem specifically for use with the
ITERATE command in a specific context.
scope
is one of the following:
digits
LINES
where
digits
is a decimal number that gives the number of lines to be
controlled following the ITERATE command. The line count includes source
lines, command lines, and comment lines.
LINES UNTIL TAG
label
where
label
is an alphanumeric string (including -), at most 30 characters
long, which must begin with a letter and cannot end in a hyphen. When this
form of
scope
is used, a tag must be inserted to terminate
scope
, as follows:
%END-ITERATE
label
where
label
matches the
label
specified in the ITERATE command.
Considerations
A specified set of constructs is available for use with the ITERATE command. Use
of these variables is governed by a set of rules. Syntax and descriptions for these
constructs, along with conditions for using them, appear in Appendix C.
The number of iterations through the
scope
is determined by the number of
objects in the set referenced by the construct. For example, if the construct
represents requester screen fields within the context of a specific requester,
ITERATE dictates that the designated set of code lines be processed once for each
screen field defined for the requester. Each iteration will establish one screen field
as the current screen field.
Predefined constructs might change value during different iterations through the
same set of lines, causing changes in the modification or conditional use of the
source lines.