HP Fortran Programmer's Reference (September 2007)

Intrinsic procedures
Intrinsic procedure specifications
Chapter 11 589
Argument
X must be of type real. It may be scalar or array valued.
Result type,
type parameters,
and shape
Default integer scalar.
Result value
The result has the value
e
max
, as defined in “The Real Number System Model” on page 509.
Specific forms
KMAXLOC.
MAXLOC(ARRAY, MASK)
Optional argument
MASK
Description
Returns the location of the first element of ARRAY having the maximum value of the elements
identified by MASK.
Class
Transformational function.
Arguments
ARRAY must be of type integer or real. It must not be scalar.
MASK (optional) must be of type logical and must be conformable with ARRAY.
Result type,
type parameters,
and shape
The result is of type default integer; it is an array of rank one and of size equal to the rank of
ARRAY.