rank(3f) - [FORTRAN:INTRINSIC:ARRAY INQUIRY] Rank of a data object
Syntax
Description
Arguments
Return Value
Example
Standard
Class
result = rank(a)
rank(a) returns the rank of a scalar or array data object.
A - can be of any type
The return value is of type INTEGER and of the default integer kind. For arrays, their rank is returned; for scalars zero is returned.
Sample program:
program demo_rank integer :: a real, allocatable :: b(:,:)print *, rank(a), rank(b) ! Prints: 0 2 end program demo_rank
[[TS 29113]]
Inquiry function
rank (3) | March 19, 2019 |