SHAPE intrinsic function
Standard: F77 F90 F95 F2003
  Example Program

ARRAY : array of any type and rank N;
KIND : scalar Integer constant expression;

Result : Integer or Integer(Kind=KIND).
The SHAPE intrinsic function returns the shape of an array as a vector of length N. The value of each element in the result is the extent of (number of elements in) that dimension of the array.

In Fortran 2003, the KIND argument should be used when any extent might exceed the range of a default integer.

DIMENSION attribute, LBOUND intrinsic function, SIZE intrinsic function, UBOUND intrinsic function