Clicky

Fortran Wiki
present (Rev #2, changes)

Skip the Navigation Links | Home Page | All Pages | Recently Revised | Authors | Feeds | Export |

Showing changes from revision #1 to #2: (追記) Added (追記ここまで) | (削除) Removed (削除ここまで) | (削除) Chan (削除ここまで)(追記) ged (追記ここまで)

Description

Determines whether an optional dummy argument is present.

Standard

(削除) Fortran 95 and later (削除ここまで)(追記) 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

category: (削除) Intrinsics (削除ここまで)(追記) intrinsics (追記ここまで)

Revision from April 30, 2009 20:14:24 by Jason Blevins
Forward in time (to current) | Back in time (1 more) | See current | Hide changes | History | Rollback | View: Source | Linked from: Intrinsic procedures

AltStyle によって変換されたページ (->オリジナル) /