Share this page

# float

Defines a floating point number in 4 bytes, in the range of 3.4e +/-38 (7 digits). See Type-Specifier for more information.

## Example

The following example converts the initial portion of the string, s, to a float.

        double atof( const char * string); // Explicit declaration
        float x;
        char * s = "7.2339 by these hilts or I am a villain else";
        x = atof(s);

    // The %.2f formatting string limits the output to 2 decimal places

        lr_output_message ("%.2f", x);

    Example: Output:
    vuser_init.c(11): 7.23

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: