[UP]


Manual Reference Pages  - float (3)

NAME

float(3f) - [FORTRAN:INTRINSIC:NUMERIC:TYPE] Convert integer to default real

SYNTAX

result = float(a)

DESCRIPTION

float(a) converts the integer A to a default real value.

ARGUMENTS

A The type shall be INTEGER.

RETURN VALUE

The return value is of type default REAL.

EXAMPLE

Sample program:

    program demo_float
    implicit none
        integer :: i = 1
        if (float(i) /= 1.) stop ’ FLOAT FAILED’
    end program demo_float

STANDARD

[[FORTRAN 77]] and later

CLASS

[[Elemental procedure|Elemental function]]

SEE ALSO

dble(3), real(3)


float (3) March 11, 2021
Generated by manServer 1.08 from cec2feef-1093-41ff-bb5e-5d42c2153360 using man macros.