CONTIGUOUS attribute

Standard: F77 F90 F95 F2003 F2008 F2018 Example program


type-spec, CONTIGUOUS [ , attr-spec ]... :: entity-decl-list

CONTIGUOUS [ :: ] name [ , name ]...

Each name must be the name of an array pointer or an assumed-shape array.


The CONTIGUOUS attribute specifies that an array pointer can only become associated with a contiguous array target, or that an assumed-shape dummy array is contiguous.

In the case of an array pointer, it is an error to attempt to pointer-assign a discontiguous target to the pointer. In the case of a dummy array, the actual argument is permitted to be discontiguous, and in this case the dummy array will be a contiguous copy of the original (if the dummy is not INTENT(OUT), a copy will be made on entry, whereas if the dummy is INTENT(OUT), no copy will be made on entry but the dummy will be copied to the actual argument on exit).

If a dummy argument has the CONTIGUOUS attribute, the procedure must be referenced with an explicit interface (if it is a dummy procedure or external procedure, that means it needs an interface block).


DIMENSION attribute, Pointer assignment statement, POINTER attribute, Type Declaration statement