ATOF(3)

NAME
atof, atof_l - convert ASCII string to double

SYNOPSIS
#include <stdlib.h>
double
atof(const char *nptr);
#include <xlocale.h>
double
atof_l(const char *nptr, locale_t loc);

DESCRIPTION
The atof() and atof_l() functions convert the initial portion of the string pointed to by nptr to double representation. The atof() function uses the current locale while atof_l() uses the locale provided as parameter.

It is equivalent to:

    strtod(nptr, (char **)NULL);

SEE ALSO
atoi(3), atol(3), strtod(3), strtol(3), strtoul(3) xlocale(3)

STANDARDS
The atof() function conforms to ansiC. The atof_l() function is a Darwin extension.

HISTORY
An atof() function first appeared in AT&T UNIX.