[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
type array type identifier = array [index type] of element type |
type array type identifier = array [index type, ..., index type] of element type |
The reserved word array
defines an array type. index type
has to be an ordinal type, subrange type or an enumerated type, where
several index types, separated by commata, are allowed. element type
is an arbitrary type. An element of an array is accessed
by array type variable [index number]. The upper and
lower index bounds can be determined by the intrinsic functions High
and Low
.
type IntArray = array [1 .. 20] of Integer; Foo = array [(Mo, Tu, We, Th, Fr, Sa, Su)] of Char; Bar = array [0 .. 9, 'a' .. 'z', (Qux, Glork1, Fred)] of Real; Baz1 = array [1 .. 10] of IntArray; { equal (but declared differently): } Baz2 = array [1 .. 10, 1 .. 20] of Integer; |