Array Data Type
 
 
 

Declaration:

array <name> [ <number of elements> ];

Reference:

<name> [ <number of desired element> ]

Purpose:

An array may only be specified as a variable (see Declaring Variables). It must have a name. Whereas other data types have component items, each of a specific type and with defined semantics, an array is just an aggregation of items. The elements of an array may be of any type, and their meaning depends upon their contents.

Comments:

The syntax of an array reference is

<array name> [ <subscript> ]

where the <subscript> is any expression. The subscript will be converted to an integer for purposes of referencing the array element.

Example:

array b[3];