<Syntax> 



MINVAL ( ARRAY, DIM [ , MASK ] )
MINVAL ( ARRAY [ , MASK ] )
ARRAY : rank N array of type Integer, Real or Character;
DIM : scalar Integer in the range 1 to N;
MASK : array of type Logical and the same shape as ARRAY;
Result: Same type and type parameters as ARRAY. 





<Semantics> 



Returns the minimum value of the masked elements of ARRAY.
If DIM is absent, the result is scalar.
If DIM is present, it reduces the array in that dimension with the MIN operation;
the result has the shape of ARRAY with dimension DIM omitted.
If no elements are selected for a set of MIN operations,
the result is the highest value possible for ARRAY.
The ability to apply MINVAL to type Character was added by Fortran 2003.






<Related> 



Arrayarray operations,
Arrayscalar operations,
MAXLOC intrinsic function,
MAXVAL intrinsic function,
MINLOC intrinsic function,
Reduction intrinsic functions 

