XL Fortran for AIX 8.1

Language Reference

Array Declarators

An array declarator declares the shape of an array.

You must declare every named array, and no scoping unit can have more than one array declarator for the same name. An array declarator can appear in the following statements: COMMON, integer POINTER, STATIC, AUTOMATIC, DIMENSION, ALLOCATABLE, POINTER, TARGET and type declaration.

For example:

DIMENSION :: A(1:5)         ! Declarator is "(1:5)"
REAL, DIMENSION(1,1:5) :: B ! Declarator is "(1,1:5)"
INTEGER C(10)               ! Declarator is "(10)"

Pointers can be scalars, assumed-shape arrays or explicit-shape arrays.

The form of an array declarator is:


is an array specification. It is a list of dimension declarators, each of which establishes the lower and upper bounds of an array, or specifies that one or both will be set at run time. Each dimension requires one dimension declarator.

+-------------------------------IBM Extension--------------------------------+

An array can have from one to twenty dimensions in XL Fortran.

+----------------------------End of IBM Extension----------------------------+

An array_spec is one of:


Each array_spec declares a different kind of array, as explained in the following sections.

[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]