REAL(A, KIND)

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

Result value

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:
  1. IBM Extension: the ability to specify a nondefault integer argument.
  2. IBM Extension: the inability to pass the name as an argument.