• Reference Guide

Component Reference

The ref parameter denotes a variable or a data item (l-value). The operator returns a reference (l-value) to the component of the data identified by the ref parameter. The component is identified by a name (for structures and named elements of sequence) or by an index (for sequences and arrays). If the index or the name is specified by an expression, it is necessary to enclose it in parentheses in order to distinguish it from a direct component name. The index parameter is of the type Int; the first element has index 0. If the name is specified by an expression, it must return a value of the Atom type. A value of this type can be created for example using the typecast operator from a String value.
The [] (Component Reference by Index) operator is equivalent to the component reference operator with the index parameter.
For details, see the chapter on data references.
If the name specified is not a valid structure component or the index is out of range, an error is returned.

See Also