my previous version was wrong; this one is right
[unix-history] / usr / src / lib / libc / stdlib / atol.3
CommitLineData
32d993b1
KB
1.\" Copyright (c) 1990 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\" @(#)atol.3 5.1 (Berkeley) %G%
7.\"
8.TH ATOL 3 ""
9.UC 7
10.SH NAME
11atol \- convert ASCII string to long integer
12.SH SYNOPSIS
13.nf
14.ft B
15#include <stdlib.h>
16
17long
18atol(const char *nptr);
19.ft R
20.fi
21.SH DESCRIPTION
22The
23.I atol
24function converts the initial portion of the string pointed to by
25.I nptr
26to
27.I long integer
28representation.
29.PP
30It is equivalent to:
31.sp
32.RS
33strtol(nptr, (char **)NULL, 10);
34.RE
35.SH SEE ALSO
36atof(3), atoi(3), strtod(3), strtol(3), strtoul(3)
37.SH STANDARDS
38.B Atol
39conforms to ANSI X3.159-1989 (``ANSI C'').