Subscriptions

Elan has only one-dimensional arrays (rows) of a size (cardinality) fixed at compile time. A row can be subscripted to obtain one of its elements (which in its turn may be a row, a structure or a simple value). A multidimensional array can be realized as a row of rows.

(315,040) (000,030)subscription (000,010)(1,0)030060primary (1,0)030010[ (1,0)030060expression (1,0)030010] (1,0)030

The primary must yield a row. The expression must yield an integer, whose value lies between 1 and the cardinality of that row. The type of a subscription is the type of the element yielded. The subscription inherits the access attribute of the primary. This implies that an assignation to a subscription is possible only if the primary is a variable.