Intel® Fortran Compiler 17.0 Developer Guide and Reference

COSHAPE

Inquiry Intrinsic Function (Generic): Returns the sizes of codimensions of a coarray.

Syntax

result = COSHAPE (coarray [, kind])

coarray

(Input) Is a coarray. It may be of any data type. It must not be an unallocated allocatable coarray.

kind

(Input; optional) Must be a scalar integer initialization expression.

Results

The result is an integer array of rank one whose size is equal to the corank of coarray. If kind is present, the kind parameter of the result is that specified by kind; otherwise, the kind parameter of the result is that of default integer.

The result has a value whose ith element is equal to the size of the ith codimension of coarray as provided by UCOBOUND(coarray, i) − LCOBOUND(coarray, i) + 1.

The setting of compiler options specifying integer size can affect this function.

Example

Consider the following coarray declaration:

REAL :: X (10, 20) [10, -1:8, 0:*]

It has these properties:

See Also