HP Fortran Programmer's Reference (September 2007)

Intrinsic procedures
Intrinsic procedure specifications
Chapter 11 595
The
i
th subscript returned lies in the range 1 to
e
i
, where
e
i
is the extent of
the
i
th dimension of ARRAY.
If more than one element has the minimum value, the element whose
subscripts are returned is the first such element, taken in array element
order. If ARRAY has size zero, the value of the result is processor-dependent.
Case 2 If MASK is present, the result is a rank-one array whose element values are
the values of the subscripts of an element of ARRAY, corresponding to a
.TRUE. element of MASK, whose value equals the minimum value of all such
elements of ARRAY.
The
i
th subscript returned lies in the range 1 to
e
i
, where
e
i
is the extent of
the
i
th dimension of ARRAY. If more than one such element has the
minimum value, the element whose subscripts are returned is the first such
element taken in array element order.
If ARRAY has size zero or every element of MASK has the value .FALSE., the
value of the result is processor-dependent.
In both cases, an element of the result is undefined if the processor cannot represent the value
as a default integer.
Specific forms
KMINLOC.
MINVAL(ARRAY, DIM, MASK)
Optional argument
DIM, MASK
Description
Minimum value of all the elements of ARRAY along dimension DIM corresponding to .TRUE.
elements of MASK.
Class
Transformational function.
Arguments
ARRAY must be of type integer or real. It must not be scalar.