Go to the first, previous, next, last section, table of contents.


atof

Syntax

#include <stdlib.h>

double atof(const char *string);

Description

Convert as much of the string as possible to an equivalent double precision real number.

This function is almost like strtod(string, NULL) (see section strtod).

Return Value

The equivalent value, or zero if the string does not represent a number.

Portability

ANSI, POSIX

Example

main(int argc, char **argv)
{
  double d = atof(argv[1]);
  ...


Go to the first, previous, next, last section, table of contents.