Library /sys$common/syshlp/helplib.hlb  —  FORTRAN  Intrinsic Procedures, MAXVAL
  MAXVAL (array [,dim] [,mask]

  Class:  Transformational function - Generic

  Returns the maximum value of all elements in an array, a set of
  elements in an array, or elements in a specified dimension of an
  array.

  The array can be of type integer or real.  The "dim" must be a
  scalar integer with a value in the range 1 to n, where "n" is the
  rank of "array".  The "mask" must be a logical array conformable
  with "array".

  The result is the same data type as "array".  The result is a
  logical array with the same kind type parameter as "array".  The
  result is a scalar if "dim" is absent or "array" has rank one.
  Otherwise, the result is an array with rank that is one less than
  "array", and shape (d1, d2,..., d"dim"-1, d"dim"+1,..., dn), where
  (d1, d2,..., dn) is the shape of "array".

  The result of MAXVAL (array) has a value equal to the maximum value
  of all the elements in "array".

  The result of MAXVAL (array, mask=mask) has a value equal to the
  maximum value of the elements in "array" corresponding to the
  condition specified by "mask".

  If "array" has size zero or if there are no true elements in
  "mask," the result has the value of the negative number of the
  largest magnitude supported by the processor for numbers of the
  type and kind type parameter of "array".

  Examples:

  The value of MAXVAL ((/2, 3, 4/)) is 4.

  The value of MAXVAL (B, MASK=B .LT.  0.0) finds the maximum of the
  negative elements of B.

  Consider that C is the array

   |2 3 4|
   |5 6 7|

  MAXVAL (C, DIM=1) has the value (5, 6, 7).

  MAXVAL (C, DIM=2) has the value (4, 7).
Close Help