### First

Category

Flow Control

Function

Indicates whether the current iteration is the first iteration of a loop.

Syntax This module has no inputs.

Outputs

Name | Type | Description
--- | --- | ---
`first` | flag | Is this the first iteration of the loop?

Functional Details

The output on the first iteration of a loop is 1 (one), and on all subsequent iterations 0 (zero).

Typically, loops are initiated with ForEachMember or ForEachN, although they can also be implemented with a Get/Set pair and Done. First is often useful for resetting the GetGlobal tool at the beginning of a loop. Note that if GetLocal is used in a loop, First is unnecessary.

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

See Also

Done, ForEachMember, ForEachN, GetGlobal, GetLocal, SetGlobal, SetLocal

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

[ OpenDX Home at IBM | OpenDX.org ]