DIM(3f)

DESCRIPTION
DIM(X,Y) returns the difference X-Y if the result is positive; otherwise returns zero.

STANDARD
Fortran 77 and later

CLASS
Elemental function

SYNTAX
RESULT = DIM(X, Y)

ARGUMENTS

X The type shall be INTEGER or REAL Y The type shall be the same type and kind as X.

RETURN VALUE
The return value is of type INTEGER or REAL.

EXAMPLE
          program test_dim
              integer :: i
              real(8) :: x
              i = dim(4, 15)
              x = dim(4.345_8, 2.111_8)
              print *, i
              print *, x
          end program test_dim

SPECIFIC NAMES

Name Argument Return type Standard DIM(X,Y) REAL(4) X, Y REAL(4) Fortran 77 and later IDIM(X,Y) INTEGER(4) X, Y INTEGER(4) Fortran 77 and later DDIM(X,Y) REAL(8) X, Y REAL(8) Fortran 77 and later

AUTHOR

This information was taken from the GFortran documentation (https://gcc.gnu.org/onlinedocs/gcc-5.3.0/gfortran/) and converted to a manpage by AstroFloyd (http://astrofloyd.org).