Difference between revisions of "LOOP"
From ICE Enterprises
ConvertBot (talk | contribs) (implements a basic counting loop within a macro) |
(No difference)
|
Latest revision as of 18:05, 27 April 2020
implements a basic counting loop within a macro
<count> Number of times to loop
<label> Result label to hold count (optional)
The LOOP loop is a simplified version of the DO loop that is provided for
compatibility with X-Midas.
A LOOP-ENDLOOP combination is used in a macro to loop through a sequence of
commands <count> number of times. If specified, the results parameter <label>
will contain the current loop count. When the loop is finished, <label> will
be equal to <count>.
<label> starts at 1 and continues up through <count> inclusively. Thus for
<count>=3, <label> becomes 1, 2, 3, and then the loop stops.
There are no restrictions nesting LOOP loops.
Examples:
1. Initialize the results MYRES_1 ... MYRES_7.
LOOP 7 i
result myres_^i 0
ENDDO
SEE ALSO: DO, ENDLOOP, BREAK, CONTINUE