Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ atof(3C) — A/UX 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

scanf(3S)

strtod(3C)

strtol(3C)




atof(3C) atof(3C)
NAME atof - convert ASCII string to floating-point number SYNOPSIS double atof(nptr) char *nptr; DESCRIPTION atof converts a character string pointed to by nptr to a double-precision floating point number. The first unrecog- nized character ends the conversion. atof recognizes an op- tional string of white space characters (blanks or tabs), then an optional sign, then a string of digits optionally containing a decimal point, then an optional e or E followed by an optionally signed integer. If the string begins with an unrecognized character, atof returns the value zero. atof(str) is equivalent to strtod(str,(char **)NULL) ERRORS When the correct value would overflow, atof returns HUGE, and sets errno to ERANGE. Zero is returned on underflow. SEE ALSO scanf(3S), strtod(3C), strtol(3C). April, 1990 1

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026