BSD 4_3 release
[unix-history] / usr / man / man3 / atof.3
CommitLineData
95f51977 1.\" @(#)atof.3 6.1 (Berkeley) 5/15/85
f11907db 2.\"
95f51977 3.TH ATOF 3 "May 15, 1985"
f11907db
KM
4.AT 3
5.SH NAME
6atof, atoi, atol \- convert ASCII to numbers
7.SH SYNOPSIS
8.nf
9.B double atof(nptr)
10.B char *nptr;
11.PP
12.B atoi(nptr)
13.B char *nptr;
14.PP
15.B long atol(nptr)
16.B char *nptr;
17.fi
18.SH DESCRIPTION
19These functions convert a string pointed to by
20.I nptr
15a002cb 21to floating, integer, and long integer representation respectively.
f11907db
KM
22The first unrecognized character ends the string.
23.PP
24.I Atof
15a002cb 25recognizes an optional string of spaces, then an optional sign, then
f11907db 26a string of digits optionally containing a decimal
15a002cb 27point, then an optional `e' or `E' followed by an optionally signed integer.
f11907db
KM
28.PP
29.I Atoi
30and
31.I atol
15a002cb
KM
32recognize an optional string of spaces, then an optional sign, then a
33string of
f11907db
KM
34digits.
35.SH SEE ALSO
15a002cb 36scanf(3S)
f11907db
KM
37.SH BUGS
38There are no provisions for overflow.