www.delorie.com/djgpp/doc/libc/libc_53.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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/ISO C C89; C99
POSIX 1003.2-1992; 1003.1-2001

Example

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


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright © 2004   by DJ Delorie     Updated Apr 2004  

Please take a moment to fill out this visitor survey
You can help support this site by visiting the advertisers that sponsor it! (only once each, though)