Sun Studio 12 Update 1: Fortran User's Guide

4.3.1 Syntax

The Cray POINTER statement has the following format:


POINTER  ( pointer_name, pointee_name [array_spec] ), …

Where pointer_name, pointee_name, and array_spec are as follows:

pointer_name

Pointer to the corresponding pointee_name.

pointer_name contains the address of pointee_name.Must be a scalar variable name (but not a derived type).Cannot be: a constant, a name of a structure, an array, or a function.

pointee_name

Pointee of the corresponding pointer_name

Must be: a variable name, array declarator, or array name

array_spec

If array_spec is present, it must be explicit shape, (constant or non-constant bounds), or assumed-size.

For example, we can declare Cray pointers to two pointees:


    POINTER ( p, b ),  ( q, c )

The above example declares Cray pointer p and its pointee b, and Cray pointer q and its pointee c.

We can also declare a Cray pointer to an array:


     POINTER ( ix, x(n, 0:m) )

The above example declares Cray pointer ix and its pointee x; and declares x to be an array of dimensions n by m+1.