Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 3/31/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Explicit-Coshape Coarrays

An explicit-coshape coarray is a named coarray that has its corank and cobounds declared by an explicit-coshape specification.

An explicit-coshape specification takes the following form:

[[lower-cobound:] upper-cobound, ] ... [lower-cobound:] *

lc

Is a specification expression indicating the lower cobound of the coarray. The expression can have a positive, negative, or zero value. If necessary, the value is converted to integer type.

If the lower bound is not specified, it is assumed to be 1.

uc

Is a specification expression indicating the upper cobound of the coarray. The expression can have a positive, negative, or zero value. If necessary, the value is converted to integer type. The upper cobound must not be less than the lower cobound (lc), if specified.

A nonallocatable coarray must have a coarray specification (coarray-spec) that is an explicit-coshape specification.

The corank is equal to one plus the number of upper cobounds.

A lower cobound or upper cobound that is not a constant expression must appear only in a subprogram or interface body.

If an explicit-coshape coarray is a local variable of a subprogram and has cobounds that are not constant expressions, the cobounds are determined on entry to a procedure defined by the subprogram, by evaluating the cobounds expressions . The cobounds of such a coarray are unaffected by the redefinition or undefinition of any variable during execution of the procedure.

The values of each lower cobound and upper cobound determine the cobounds of the coarray along a particular codimension. The cosubscript range of the coarray in that codimension is the set of integer values between and including the lower and upper cobounds.

Examples

The following are examples of variables with coarray specifications (coarray-specs):

A [*]
AA [2:*]
B [2, 3, *]
C [3:5, -2:7, *]

See Also