Fortran 90

6. Array Inquiry Functions
We begin now to look at a number of Fortran 90's new intrinsic functions.

The following array inquiry functions could be useful in writing generic routines involving various arrays.

  • SIZE(ARRAY [,DIM] ): Returns by default an integer
    holding the total size of ARRAY, or if DIM is present, the
    extent of just the specified dimension
  • SHAPE(SOURCE): Returns a 1-dimensional integer array holding the
    extents in each dimension of SOURCE
  • LBOUND(ARRAY [,DIM] ): Returns by default an integer
    array holding all the lower bounds of each dimension of ARRAY, or if DIM is
    present, of the specified dimension
  • UBOUND(ARRAY [,DIM] ): Similar to LBOUND, except it
    returns the upper bound(s)