\"\" \"\" \"\"
Go backward to Length(): Length
Go up to Selection
RISC-Linz logo

[]: Indexing

e = a[i]
a[i] = e
      T e
      Array<T> a
      int i

Specification: The first form returns the object e stored in slot i of array a. The second form destructively updates a by writing e into slot i. The first slot has index 0.

Constraints: It is illegal to apply this operator to an unbound a or to an index outside the range [0, Length(a)-1].

Complexity: O(1).


Author: Wolfgang Schreiner
Last Modification: April 12, 1997