present(3f) - [FORTRAN:INTRINSIC] Determine whether an optional dummy argument is specified
result = present(a)
Determines whether an optional dummy argument is present.
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.
Returns either TRUE if the optional argument A is present, or FALSE otherwise.
Sample program:
program demo_present implicit none write(*,*) f(), f(42) ! "f t" contains logical function f(x) integer, intent(in), optional :: x f = present(x) end function end program demo_present
[[Fortran 95]] and later
[[Inquiry function]]
present (3) | March 11, 2021 |