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

ID 767251
Date 3/22/2024
Public

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

Document Table of Contents

LCOBOUND

Inquiry Intrinsic Function (Generic): Returns the lower cobounds of a coarray.

result = LCOBOUND (coarray [,dim [, kind])

coarray

(Input) Must be a coarray; it can be of any type. It can be a scalar or an array. If it is allocatable, it must be allocated.

dim

(Input; optional) Must be an integer scalar with a value in the range 1 <= dim <= n, where n is the corank of coarray. The corresponding actual argument must not be an optional dummy argument.

kind

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

Results

The result type is integer. If kind is present, the kind parameter is that specified by kind; otherwise, the kind parameter is that of default integer type. The result is scalar if dim is present; otherwise, the result is an array of rank one and size n, wheren is the corank of coarray.

The result depends on whether dim is specified:

  • If dim is specified, LCOBOUND (COARRAY, DIM) has a value equal to the lower cobound for cosubscript dim of coarray.

  • If dim is not specified, LCOBOUND (COARRAY) has a value whose ith element is equal to LCOBOUND (COARRAY, i), for i = 1, 2,. . . , n, where n is the corank of coarray.

Example

If B is allocated by the statement ALLOCATE (B [2:3, 8:*]), then LCOBOUND (B) is [2, 8] and LCOBOUND (B, DIM=2) is 8.