[ iterator-type ] iterator-identifier = range-specification
Modifiers
| Name | Modifies | Type | Properties |
| iterator | locator-list | Complex, name: iterator Arguments:
| unique |
|
|
Clauses
, , , ,An iterator modifier is a unique, complex modifier that defines a set of iterators, each of which is an iterator-identifier and an associated set of values. An iterator-identifier expands to those values in the clause argument for which it is specified. Each member of the modifier-parameter-specification list of an iterator modifier is an iterator-specifier with this format:
where:
In a range-specification, if the step is not specified its value is implicitly defined to be 1.
An iterator only exists in the context of the clause argument that it modifies. An iterator also hides all accessible symbols with the same name in the context of that clause argument.
The use of a variable in an expression that appears in the range-specification causes an implicit reference to the variable in all enclosing constructs.
if step > 0,
if step < 0,
if step > 0,
if step < 0,
The set of values will be empty if no possible value complies with the conditions above.
If an iterator-identifier appears in a list-item expression of the modified argument, the effect is as if the list item is instantiated within the clause for each member of the iterator value set, substituting each occurrence of iterator-identifier in the list-item expression with the iterator value. If the iterator value set is empty then the effect is as if the list item was not specified.
Restrictions
Restrictions to iterator modifiers are as follows:For each value i in an iterator value set, the mathematical result of i + step must be representable in iterator-type.
Cross References