![]() |
Section 6.3.2:
|
An iterator (or 'iter' for short) is a language construct that encapsulates programmer-defined looping control structures in a similar manner to the role played by routines in the specification of algorithms. An iter signature therefore defines the forms and types of arguments and, if appropriate, a yielded value type definition.
The only difference between routine and iter parameters is that an iter parameter may be specified as 'once', in which case it is only evaluated on initial entry to the iterator. The only visible difference to the programmer is that the iter identifier is followed by an Iter_Signifier_SY ('!') to form an iter name.
The Feature abstract syntax which is common to all class components is given here with an invariant specifically for the case of an iterator. Since this is a signature there is no implementation component and no value.
TO BE DONE
Having no implementation and no value - being only a signature (found in abstract classes or as a stub or type definition), there can be no run-time meaning.
![]() |
Specification Index | ![]() |
Language Index | ![]() |
Examples | ![]() |
Section 6 Index |
Comments
or enquiries should be made to Keith Hopper. Page last modified: Thursday, 20 July 2000. |
![]() |