SEQUENCE OF Type
12-1
The SEQUENCE OF type allows the definition of either an arbitrary or fixed number of items of the same type, where order is important. The definition includes only the type of the SEQUENCE item, and does not name the component, for example:
Counters ::= SEQUENCE OF INTEGER
In NCL, SEQUENCE OF items are referenced by index only, within their parent structure. In the example above, the following index values are used to reference the sequence items of a component named
counters
of type Counters:counter.{1} counter.{2} ... counter.{n}
External Form -- Input and Output
All structures have an external form that is the same as their local form.
Local Form and Behavior
The local form of a SEQUENCE OF type is the data stream consisting of each set component, where each component has its leading tag and length (where applicable, as determined by the parent component) and data in the local form for its type.
Named Values
Named values are not applicable to the SEQUENCE OF type.
Constraints
An upper limit can be placed on the number of items that the sequence can contain by use of the SIZE keyword. For example:
Counters ::= SEQUENCE SIZE(50) OF INTEGER
It is also possible to specify a range, but the lower bound is ignored.