Return value

This function determines the location of the first element of ARRAY along
dimension DIM having the maximum value of the elements identified by MASK.
If DIM is not present, the result is an array of rank one and size n,
otherwise the result is of rank n  1 and has a shape that is the same
as that of ARRAY but omitting dimension DIM.

Example

If A = [3, 2, 9, 9] then MAXLOC(A) is 3.
If A = then
MAXLOC(A, MASK = A .LT. 5) is [1, 4] which is the location of the largest value
for this mask.
If A = then
MAXLOC(A, DIM = 1) is [2, 2, 2, 1] and MAXLOC(A, DIM = 2) is [4, 3].
