PRESENT(3f)

DESCRIPTION
Determines whether an optional dummy argument is present.

STANDARD
Fortran 95 and later

CLASS
Inquiry function

SYNTAX
RESULT = PRESENT(A)

ARGUMENTS

A May be of any type and may be a pointer, scalar or array value, or a dummy procedure. It shall be the name of an optional dummy argument accessible within the current subroutine or function.

RETURN VALUE
Returns either TRUE if the optional argument A is present, or FALSE otherwise.

EXAMPLE
          PROGRAM test_present
            WRITE(*,*) f(), f(42) ! "F T"
          CONTAINS
            LOGICAL FUNCTION f(x)
              INTEGER, INTENT(IN), OPTIONAL :: x
              f = PRESENT(x)
            END FUNCTION
          END PROGRAM

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).