[UP]


Manual Reference Pages  - real (3)

NAME

real(3f) - [FORTRAN:INTRINSIC:NUMERIC] Convert to real type

CONTENTS

Syntax
Description
Arguments
Return Value
Example
Standard
Class
See Also

SYNTAX

result = real(x [, kind])

DESCRIPTION

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

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

Sample program:

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

STANDARD

[[FORTRAN 77]] and later

CLASS

Elemental function

SEE ALSO

[[dble]], [[float]]


real (3) March 19, 2019
Generated by manServer 1.08 from e25aa430-8912-40e8-8371-aa8af773bf25 using man macros.