C Library Functions  - 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)


Nemo Release 3.1 float (3) June 29, 2025
Generated by manServer 1.08 from 1d86ff91-f0d6-4858-833b-f1fe39b8bc19 using man macros.