### Done

Category

Flow Control

Function

Specifies whether a loop is to be terminated.

Syntax Done`(done);`

Inputs

Name | Type | Default | Description
--- | --- | --- | ---
`done` | flag | none | 0: no termination 1: terminate the loop

Functional Details

This module terminates a loop. If `done` is set to:

0 | The macro containing the Done module will continue to execute until `done` = 1 or until one of the other looping tools (ForEachN or ForEachMember) terminates the loop.
1 | The loop is terminated upon completion of the current loop iteration, regardless of how many iterations have been, or remain to be, executed.

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

Notes:

1. If this module is used in the scripting language, the results are defined only if it is used inside a macro.

2. If `done` is set to 1 by an interactor during the execution of a loop, the new setting will not take effect until the loop is completed: new interactor values are considered at the end of an execution, and a complete loop is considered to be a single execution.

3. Simply placing a Done icon in a visual program and setting the parameter `done` to 0 (zero) will create an infinite loop.

Example Visual Programs

    Bounce.net
    SimpleGetSetLoop.net

See Also

First, 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 ]