Clicky

Fortran Wiki
float

Description

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

Standard

FORTRAN 77 and later

Class

Elemental function

Syntax

result = float(a)

Arguments

  • a - The type shall be integer.

Return value

The return value is of type default real.

Example

program test_float
    integer :: i = 1
    if (float(i) /= 1.) call abort
end program test_float

See also

dble, real

category: intrinsics