Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <stdlib.h>
    double atof( const char *ptr );
    double _wtof( const wchar_t *ptr );

Description:
    The atof function converts the string pointed to by ptr to double
    representation.  It is equivalent to


         strtod( ptr, (char **)NULL )

    The _wtof function is identical to atof except that it accepts a
    wide-character string argument.  It is equivalent to


         wcstod( ptr, (wchar_t **)NULL )


Returns:
    The atof function returns the converted value.  Zero is returned when
    the input string cannot be converted.  In this case,  errno is not set.
    When an error has occurred,  errno contains a value indicating the type
    of error that has been detected.

Example:
    #include <stdlib.h>

    void main()
      {
        double x;

        x = atof( "3.1415926" );
      }

Classification:
    atof is ANSI, _wtof is not ANSI

Systems:
     atof - Math

    _wtof - Math

See Also:
    sscanf, strtod

See Also:

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson