MIN(3) - [NUMERIC] Minimum value of an argument list
result = min(a1, a2, a3, ... )
elemental TYPE(kind=KIND) function min(a1, a2, a3, ... )TYPE(kind=KIND,intent(in) :: a1 TYPE(kind=KIND,intent(in) :: a2 TYPE(kind=KIND,intent(in) :: a3 : : :
o TYPE may be integer, real or character.
MIN(3) returns the argument with the smallest (most negative) value.
See MAX(3) for an extended example of the behavior of MIN(3) as and MAX(3).
o A1 : the first element of the set of values to determine the minimum of. o A2, A3, ... : An expression of the same type and kind as A1 completing the set of values to find the minimum of.
The return value corresponds to the minimum value among the arguments, and has the same type and kind as the first argument.
Sample program
program demo_min implicit none write(*,*)min(10.0,11.0,30.0,-100.0) end program demo_minResults:
-100.0000000
FORTRAN 77
MAXLOC(3), MINLOC(3), MINVAL(3), MAX(3),
fortran-lang intrinsic descriptions (license: MIT) @urbanjost
Nemo Release 3.1 | min (3fortran) | April 28, 2024 |