[UP]


Manual Reference Pages  - rank (3)

NAME

rank(3f) - [FORTRAN:INTRINSIC:ARRAY INQUIRY] Rank of a data object

SYNTAX

result = rank(a)

DESCRIPTION

rank(a) returns the rank of a scalar or array data object.

ARGUMENTS

A can be of any type

RETURN VALUE

The return value is of type INTEGER and of the default integer kind. For arrays, their rank is returned; for scalars zero is returned.

EXAMPLE

Sample program:

   program demo_rank
   implicit none
     integer :: a
     real, allocatable :: b(:,:)
     real  :: c(10,20,30)
     print *, rank(a), rank(b), rank(c)
   end program demo_rank

Results:
0 2 3

Expected output:

STANDARD

[[TS 29113]]

CLASS

Inquiry function


rank (3) March 11, 2021
Generated by manServer 1.08 from e3bf078c-853f-452c-b882-a58b82c89def using man macros.