Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ atof.bsd(3) — Domain/IX SR9.5

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

scanf(3S)

ATOF(3)

NAME

atof, atoi, atol − convert ASCII to numbers

USAGE

double atof(nptr) char *nptr;
 
atoi(nptr) char *nptr;
 
long atol(nptr) char *nptr;

DESCRIPTION

These functions convert the string that nptr points to into floating, integer, and long integer representation, respectively.  The first character that the function does not recognize ends the string. 

Atof recognizes an optional string of spaces, then an optional sign, then a string of digits which may contain a decimal point, then an optional “e” or “E”, followed by an optionally signed integer. 

Atoi and atol recognize an optional string of spaces, then an optional sign, and then a string of digits. 

NOTES

None of these functions has provisions for overflow. 

RELATED INFORMATION

scanf(3S)

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