Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

FOR EACH ​.​.​. IN ​.​.​. NEXT

  • Last UpdatedJul 13, 2023
  • 1 minute read

FOR EACH loops can be used only with collections exposed by OLE Automation servers. A FOR-EACH loop performs a function (or set of functions) within a script several times during a single execution of a script. The general format of the FOR-EACH loop is as follows:

FOR EACH <object_variable> IN <collection_object >

  [statements];

  [EXIT FOR;];

  [statements];

NEXT;

Where:

  • object_variable is a dimmed variable.

  • collection_object is a variable holding a collection object.

As in the case of the FOR … TO loop, it is possible to exit the execution of the loop through the statement EXIT FOR from within the loop.

QuickScript .NET Control Structures

TitleResults for “How to create a CRG?”Also Available in