DO

From ICE Enterprises
Jump to navigation Jump to search

implements a do loop within a macro

 
<label>  Result label to hold count (optional)
<start>  Loop start value
<end>    Loop end value (inclusive)
<inc>    Loop increment value (fractional is OK)

A DO-ENDDO combination is used in a macro to loop through a sequence of 
commands incrementing the <start> value after each pass until the <end> value 
is reached.  If <label> is specified, the results parameter will contain the 
current value.  When the loop is finished, <label> will be less than or equal 
to <end>.  If <start> is greater than <end>, the loop will not execute but 
<label> will still be written with the <start> value.

There are no restrictions nesting DO loops.

Examples:
  1. Initialize the results MYRES_1 ... MYRES_7.

   DO count 1 7 1
     result myres_^count 0
   ENDDO

SEE ALSO:  LOOP, ENDDO, BREAK, CONTINUE