real(3f) - [FORTRAN:INTRINSIC:NUMERIC] Convert to real type
Syntax
Description
Arguments
Return Value
Example
Standard
Class
See Also
result = real(x [, kind])
real(x [, kind]) converts its argument X to a real type.
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:
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.
Sample program:
program demo_real complex :: x = (1.0, 2.0) print *, real(x), real(x,8) end program demo_real
[[FORTRAN 77]] and later
Elemental function
[[dble]], [[float]]
real (3) | March 19, 2019 |