HP Fortran Programmer's Reference (September 2007)

Intrinsic procedures
Intrinsic procedure speciļ¬cations
Chapter 11596
DIM (optional) must be scalar and of type integer with a value in the range 1 <= DIM <=
n
,
where
n
is the rank of ARRAY. The corresponding actual argument must not
be an optional dummy argument.
MASK (optional) must be of type logical and must be conformable with ARRAY.
Result type,
type parameters,
and shape
The result is of the same type and kind type parameter as ARRAY. It is scalar if DIM is absent
or ARRAY has rank one; otherwise, the result is an array of rank
n
-1 and of shape (
d
1
,
d
2
, ...,
d
DIM-1
,
d
DIM+1
, ...,
d
n
) where (
d
1
,
d
2
, ...,
d
n
) is the shape of ARRAY.
Result value
Case 1 The result of MINVAL(ARRAY) has a value equal to the minimum value of all
the elements of ARRAY or has the value of the positive number of the largest
magnitude supported by the processor for numbers of the type and kind type
parameter of ARRAY if ARRAY has size zero.
Case 2 The result of MINVAL(ARRAY, MASK = MASK) has a value equal to the
minimum value of the elements of ARRAY corresponding to .TRUE. elements
of MASK or has the value of the positive number of the largest magnitude
supported by the processor for numbers of the same type and kind type
parameter as ARRAY if there are no .TRUE. elements.
Case 3 If ARRAY has rank one, MINVAL(ARRAY, DIM [,MASK]) has a value equal to
that of MINVAL(ARRAY [,MASK = MASK]). Otherwise, the value of element
(
s
1
,
s
2
, ...,
s
DIM-1
,
s
DIM+1
, ...,
s
n
) of MINVAL(ARRAY, DIM [,MASK]) is equal
to the following:
MINVAL(ARRAY(
s
1
,
s
2
, ...,
s
DIM-1
, :,
s
DIM+1
, ...,
s
n
) [, MASK=
MASK(
s
1
,
s
2
, ...,
s
DIM-1
, :,
s
DIM+1
, ...,
s
n
) ] )
MOD(A, P)
Description
Remainder function.
Class
Elemental function.