Next: Target Declaration
Up: Pointers and Targets
Previous: Pointers and Targets
Include POINTER attribute. For example:
real, pointer :: PtoR, PtoR2
PtoR, PtoR2 are pointers to a scalar, REAL target.
real, dimension(:,:), pointer :: PtoA
PtoA is pointer to a rank 2, REAL array of REALs.
- the declaration fixes the type, kind and rank of any possible target;
- pointers to arrays are declared using deffered-shape specification;
- rank of the target is fixed, but actual shape may vary;
POINTER attribute is incompatible with
ALLOCATABLE or PARAMETER.