Go backward to Length(): Length
Go up to Selection

[]: 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).


Wolfgang.Schreiner@risc.uni-linz.ac.at
Id: main.tex,v 1.10 1996/04/04 11:45:47 schreine Exp

Prev Up