### 2.2.3.2 Array Subscripts

A subscript refers to an array name. A subscript is a list of expressions, called subscript expressions, enclosed in parentheses, that determine which element in the array is being referred to. The subscript is appended to the array name it refers to.

Subscript array references are scalar references because they resolve into single data items having a data type.

A subscript takes the following form:

    (s [,s] . . . )

s
  Is a subscript expression.

A subscripted array reference must contain one subscript expression for each dimension defined for that array (one for each dimension declarator).

Each subscript can be any valid arithmetic expression. However, noninteger subscript expressions are converted to integers before use (any fractional parts are truncated).

For More Information:

For details on terminology referring to data items, see Section 2.2.6.

Previous Page Next Page Table of Contents