MAXVAL
— Maximum value of an array ¶Determines the maximum value of the elements in an array value, or, if
the DIM argument is supplied, determines the maximum value along
each row of the array in the DIM direction. If MASK is
present, only the elements for which MASK is .TRUE.
are
considered. If the array has zero size, or all of the elements of
MASK are .FALSE.
, then the result is -HUGE(ARRAY)
if ARRAY is of type INTEGER
or REAL
, 0
if it is type UNSIGNED
. or a string of nulls if ARRAY is of
character type.
Fortran 90 and later, extension for UNSIGNED
(see Unsigned integers)
Transformational function
RESULT = MAXVAL(ARRAY, DIM [, MASK]) |
RESULT = MAXVAL(ARRAY [, MASK]) |
ARRAY | Shall be an array of type INTEGER ,
REAL , UNSIGNED or CHARACTER . |
DIM | (Optional) Shall be a scalar of type
INTEGER , with a value between one and the rank of ARRAY,
inclusive. It may not be an optional dummy argument. |
MASK | (Optional) Shall be of type LOGICAL ,
and conformable with ARRAY. |
If DIM is absent, or if ARRAY has a rank of one, the result is a scalar. If DIM is present, the result is an array with a rank one less than the rank of ARRAY, and a size corresponding to the size of ARRAY with the DIM dimension removed. In all cases, the result is of the same type and kind as ARRAY.
MAX
— Maximum value of an argument list,
MAXLOC
— Location of the maximum value within an array