float(a)
converts the integer a
to a default real value.
FORTRAN 77 and later
result = float(a)
a
- The type shall be integer
.The return value is of type default real
.
program test_float
integer :: i = 1
if (float(i) /= 1.) call abort
end program test_float