Clicky

Fortran Wiki
real (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

real(x [, kind]) converts its argument x to a real type.

Standard

(削除) Fortran 77 and later (削除ここまで)(追記) FORTRAN 77 (追記ここまで)(追記) and later (追記ここまで)

Class

Elemental function

Syntax

  • result = real(x [, kind])

Arguments

  • x - Shall be integer, real, or complex.
  • kind - (Optional) An integer initialization expression indicating the kind parameter of the result.

Return value

These functions return a real variable or array under the following rules:

  1. real(x) is converted to a default real type if x is an integer or real variable.

  2. real(x) is converted to a real type with the kind type parameter of x if x is a complex variable.

  3. real(x, kind) is converted to a real type with kind type parameter kind if x is a complex, integer, or real variable.

Example

program test_real
 complex :: x = (1.0, 2.0)
 print *, real(x), real(x,8)
end program test_real

See also

dble, float

category: intrinsics

Revised on September 24, 2010 13:23:27 by Jason Blevins (128.146.137.198) (998 characters / 0.0 pages)
Edit | Back in time (2 revisions) | Hide changes | History | Views: Print | TeX | Source | Linked from: Intrinsic procedures, dble, float, logical, Arithmetic

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