\"\" \"\" \"\"
Go backward to Representation
Go up to Arrays
Go forward to Allocation
RISC-Linz logo


Array<T> a
Array<T> a(n)
      int n

Specification: Defines an array handle a.

  1. In the first form, a is not yet bound to any array.
  2. In the second form, a is bound to a new array with n slots. The contents of the slots are undefined.
Constraints: It is illegal to define a with n < 0.

Note: The second form is equivalent to 

Array<T> a
which is in turn equivalent to but more efficient than 
Array<T> a
a = Array<T>::Alloc(n)

Author: Wolfgang Schreiner
Last Modification: April 12, 1997