date and time created 91/06/29 13:31:44 by bostic
[unix-history] / usr / src / lib / libc / stdlib / atol.3
CommitLineData
ae59e04c 1.\" Copyright (c) 1990, 1991 The Regents of the University of California.
32d993b1
KB
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
ae59e04c 6.\" @(#)atol.3 5.2 (Berkeley) %G%
32d993b1 7.\"
ae59e04c
CL
8.Dd
9.Dt ATOL 3
10.Os
11.Sh NAME
12.Nm atol
13.Nd convert
14.Tn ASCII
15string to long integer
16.Sh SYNOPSIS
17.Fd #include <stdlib.h>
18.Ft long
19.Fn atol "const char *nptr"
20.Sh DESCRIPTION
32d993b1 21The
ae59e04c 22.Fn atol
32d993b1 23function converts the initial portion of the string pointed to by
ae59e04c 24.Ar nptr
32d993b1 25to
ae59e04c 26.Em long integer
32d993b1 27representation.
ae59e04c 28.Pp
32d993b1 29It is equivalent to:
ae59e04c 30.Bd -literal -offset indent
32d993b1 31strtol(nptr, (char **)NULL, 10);
ae59e04c
CL
32.Ed
33.Sh SEE ALSO
34.Xr atof 3 ,
35.Xr atoi 3 ,
36.Xr strtod 3 ,
37.Xr strtol 3 ,
38.Xr strtoul 3
39.Sh STANDARDS
40The
41.Fn atol
42function
43conforms to
44.St -ansiC .