File:  [CSRG BSD Unix] / 43BSDTahoe / man / man3 / atof.3
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:58 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43tahoe
BSD 4.3tahoe

.\"	@(#)atof.3	6.1 (Berkeley) 5/15/85
.\"
.TH ATOF 3  "May 15, 1985"
.AT 3
.SH NAME
atof, atoi, atol \- convert ASCII to numbers
.SH SYNOPSIS
.nf
.B double atof(nptr)
.B char *nptr;
.PP
.B atoi(nptr)
.B char *nptr;
.PP
.B long atol(nptr)
.B char *nptr;
.fi
.SH DESCRIPTION
These functions convert a string pointed to by
.I nptr
to floating, integer, and long integer representation respectively.
The first unrecognized character ends the string.
.PP
.I Atof
recognizes an optional string of spaces, 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.
.PP
.I Atoi
and
.I atol
recognize an optional string of spaces, then an optional sign, then a
string of
digits.
.SH SEE ALSO
scanf(3S)
.SH BUGS
There are no provisions for overflow.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.