Purpose
Convert to real type.
Class
Elemental function
Argument Type and Attributes
- A
- must be of type integer, real, or complex.
- KIND (optional)
- must be a scalar integer initialization expression.
Result Type and Attributes
- Real.
- Case (i): If A is of type integer or real and KIND is
present, the kind type parameter is that specified by KIND. If
A is of type integer or real and KIND is not present, the kind type
parameter is the kind type parameter of the default real type.
- Case (ii): If A is of type complex and KIND is present, the
kind type parameter is that specified by KIND. If A is of type
complex and KIND is not present, the kind type parameter is the kind
type parameter of A.
Result Value
- Case (i): If A is of type integer or real, the result is equal to a
kind-dependent approximation to A.
- Case (ii): If A is of type complex, the result is equal to a
kind-dependent approximation to the real part of A.
Examples
REAL (-3) has the value -3.0. REAL
((3.2, 2.1)) has the value 3.2.
Specific Name
| Argument Type
| Result Type
| Pass As Arg?
|
REAL
| default integer
| default real
| no
|
FLOAT
| any integer (1)
| default real
| no
|
SNGL
| double precision real
| default real
| no
|
SNGLQ
| REAL(16)
| default real
| no (2)
|
DREAL
| double complex
| double precision real
| no (2)
|
QREAL
| COMPLEX(16)
| REAL(16)
| no (2)
|
Notes:
- IBM Extension: the ability to specify a nondefault integer
argument.
- IBM Extension: the inability to pass the name as an argument.
