Command: identloop

Syntax

identloop <ident> {,<ident> ... } {
    command_block>
}

Description

Execute a set of commands on selected identifiers.

Parameters

Switches

Notes

The command block will be executed on each identifier satisfying the identifier list. During each block execution the generic (indirect) identifier ident may be used to refer to the relevant identifier.

The system generic structure member ident.ident_name may be used to access the name of the original identifier, including atable prefix.

If no identifier table is specified in an identifier name, the current default scope atable is searched for the identifier.

A jump to the end of the loop may be made with the continue command.

A break out of the loop may be made with a break command.

Examples

Print the names and types of all local numeric strings. Note: The idir command would achieve the same result.

identloop -ty=string { tell ident.ident_name }

Get the accumulative total of all numerics with positive values in an atable test.

numeric total = 0
identloop ~test.*,-ty=numeric {
    if (ident > 0) total += ident
}

See Also

Commands:

idir

Identifiers:

ident (generic)

Structures:

*.ident_name (string)