Clicky

Fortran Wiki
present (changes)

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

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

Description

Determines whether an optional dummy argument is present.

Standard

Fortran 95 and later

Class

(削除) Inquiry function (削除ここまで)(追記) 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

Revised on May 3, 2009 22:48:05 by Jason Blevins (71.70.142.190) (759 characters / 0.0 pages)
Edit | Back in time (2 revisions) | Hide changes | History | Views: Print | TeX | Source | Linked from: Intrinsic procedures

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