PML Customisation User Guide

Control Logic : DO Loops
A do-loop enables a series of commands to be repeated more than once. The number of times the series is repeated is controlled by a counter.
Control is passed to the line following the enddo command after executing the commands within the loop with the counter variable at its final value.
The full format of the do-loop is as follows:
The enddo must be present at the end of the loop.
The !X , from, to and by are optional, therefore in its simplest form you may use:
If you do not supply a loop variable, a hidden unnamed variable will be used for the counter.
Note:
The loop variable is REAL. PML will delete any pre-existing variable of the same name. After the loop has finished, the counter variable will retain the value it had last time through the loop.

1974 to current year. AVEVA Solutions Limited and its subsidiaries. All rights reserved.
AVEVA Logo