Clicky
Showing changes from revision #1 to #2:
(追記) Added (追記ここまで) | (削除) Removed (削除ここまで) | (削除) Chan (削除ここまで)(追記) ged (追記ここまで)
real(x [, kind])
converts its argument x
to a real type.(削除) The (削除ここまで)(削除) realpart(x)
(削除ここまで)(削除) function is provided for compatibility with (削除ここまで)(削除) g77
(削除ここまで)(削除) , and its use is strongly discouraged. (削除ここまで)
Fortran 77 and later
Elemental function
result = real(x [, kind])
result = realpart(z)
x
- Shall be integer
, real
, or complex
.kind
- (Optional) An integer
initialization expression indicating the kind parameter of the result.These functions return a real
variable or array under the following rules:
real(x)
is converted to a default real type if x
is an integer or real variable.
real(x)
is converted to a real type with the kind type parameter of x
if x
is a complex variable.
real(x, kind)
is converted to a real type with kind type parameter kind
if x
is a complex, integer, or real variable.
program test_real
complex :: x = (1.0, 2.0)
print *, real(x), real(x,8(削除) ), (削除ここまで)(削除) (削除ここまで)(削除) realpart (削除ここまで)(削除) ( (削除ここまで)(削除) x (削除ここまで))
end program test_real