SIZE intrinsic function
Standard: F77 F90 F95 F2003
  Example Program
<Syntax>
SIZE ( ARRAY [ , DIM , KIND ] )

ARRAY : array of any type and rank N;
DIM : scalar Integer in the range 1-N;
KIND : scalar Integer constant expression;

Result: Integer or Integer(Kind=KIND).
<Semantics>
The SIZE intrinsic function returns the number of elements in the array (if DIM is absent), or the extent of the array in dimension DIM if DIM is present.

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

<Related>
DIMENSION attribute, LBOUND intrinsic function, SHAPE intrinsic function, UBOUND intrinsic function