RANK

9.217 RANK — Rank of a data object

Description:
RANK(A) returns the rank of a scalar or array data object.
Standard:
Technical Specification (TS) 29113
Class:
Inquiry function
Syntax:
RESULT = RANK(A)
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:
program test_rank
  integer :: a
  real, allocatable :: b(:,:)

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

© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-5.4.0/gfortran/RANK.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部