Intel® Fortran Compiler 17.0 Developer Guide and Reference

RANK

Inquiry Intrinsic Function (Generic): Returns the rank of a data object.

result = RANK (a)

a

(Input) Is a data object. It can be of any type.

Results

The result type is default integer scalar. The result value is the rank of a.

Example

If object C is an assumed-rank dummy argument and its associated argument is an array of rank 5, RANK(C) returns the value 5.

If D is an array declared DIMENSION (2, 3, 4), RANK(D) returned the value 3.

See Also