[UP]


Manual Reference Pages  - present (3)

NAME

present(3f) - [FORTRAN:INTRINSIC] Determine whether an optional dummy argument is specified

CONTENTS

Syntax
Description
Arguments
Return Value

SYNTAX

result = present(a)

DESCRIPTION

Determines whether an optional dummy argument is present.

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

Sample program:

       program demo_present
         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

    STANDARD

[[Fortran 95]] and later

    CLASS

[[Inquiry function]]


present (3) March 19, 2019
Generated by manServer 1.08 from a14a43ef-36f4-4c82-8953-372f7fdeff78 using man macros.