Go to the first, previous, next, last section, table of contents.

Array Constructor

An array constructor is an array-valued expression. array-type must be a fixed or open array type (see section Array Types). Each expr must be assignable to the element type of A. Thus, multidimensional array constructors are built by nesting array constructors (see tictactoe example below). For fixed array constructors, there must be one expression per slot, with the shortcut that if ", .." is included at the end, the last expression is repeated as many times as is needed to fill out the array.


Example

In some of the examples below, the type of the constant or variable is explicitly specified apart from the constructor. In others, the constructor itself provides the type. Either case is valid.


Note: Open array types can be used for procedure parameters. You can create open arrays at run-time via the NEW call.


Go to the first, previous, next, last section, table of contents.