[UP]


Manual Reference Pages  - rank (3)

NAME

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

CONTENTS

Syntax
Description
Arguments
Return Value
Example
Standard
Class

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
     integer :: a
     real, allocatable :: b(:,:)

print *, rank(a), rank(b) ! Prints: 0 2 end program demo_rank

STANDARD

[[TS 29113]]

CLASS

Inquiry function


rank (3) March 19, 2019
Generated by manServer 1.08 from 393d8bea-f417-4590-9820-4c2bf1d9b6a8 using man macros.