OpenDX - Documentation
Full Contents QuickStart Guide User's Guide User's Reference
Previous Page Next Page Table of Contents Partial Table of Contents Index Search

ForEachMember

Category

Flow Control

Function

Iterates through the members of a group or the items of an array.

Syntax

member, index, last = ForEachMember(object);

Inputs
Name Type Default Description
object group, value list, or string list (none) object to be iterated through

Outputs
Name Type Description
member object current member
index integer index number of member
last flag status of loop

Functional Details

This module initiates an iteration for each member of a group or item in an array unless execution is terminated earlier by Done. In the user interface, this module would usually be part of a macro, and only the contents of the macro would be executed for each iteration of the loop. If this module is placed in the top level visual program, the entire program will be executed during the loop.

Typically, loops are initiated with ForEachMember or ForEachN, although they can also be implemented with a Get/Set pair and Done.

Note: If this module is used in the scripting language, the results are defined only if they are used inside a macro.

object

is the object to be iterated over: either a group or a list.

This module has three outputs:

member

identifies the member currently being iterated.

index

is the index number of the member being iterated (in a zero-based counting system).

last

is a flag indicating whether or not this is the last iteration through the loop.

Example Visual Program

Accumulate.net

See Also

 Done,  First,  ForEachN,  GetGlobal,  GetLocal,  SetGlobal,  SetLocal

 Chapter 4. "Data Explorer Execution Model" in IBM Visualization Data Explorer User's Guide.


Full Contents QuickStart Guide User's Guide User's Reference

[ OpenDX Home at IBM | OpenDX.org ]