float(3f) - [FORTRAN:INTRINSIC:NUMERIC:TYPE] Convert integer to default real
result = float(a)
float(a) converts the integer A to a default real value.
A The type shall be INTEGER.
The return value is of type default REAL.
Sample program:
program demo_float implicit none integer :: i = 1 if (float(i) /= 1.) stop FLOAT FAILED end program demo_float
[[FORTRAN 77]] and later
[[Elemental procedure|Elemental function]]
dble(3), real(3)
Nemo Release 3.1 | float (3) | February 23, 2025 |