Structured Programming
en-938872/2 1 - 11
1
With TO, the loop continues to be executed as long the current value of the variable
is less than or equal to the final value (incrementing of the variable).
With DOWNTO, the loop continues to be executed as long the current value is higher
than or equal to the final value (decrementing of the variable).
The value of BY is incremented or decremented from the variable each cycle (the
default value of Y is equal to 1).
BY must always have a positive value. If the value of BY is negative, functions TO
and DOWNTO are reversed.
Example
Resetting the tool data
FOR L1=1 TO 20
DO
L2=56000+L1
EL2=0
ENDF