xref: /original-bsd/lib/libc/stdlib/atol.3 (revision e0399a72)
1.\" Copyright (c) 1990, 1991 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"     @(#)atol.3	5.2 (Berkeley) 04/19/91
7.\"
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
21The
22.Fn atol
23function converts the initial portion of the string pointed to by
24.Ar nptr
25to
26.Em long integer
27representation.
28.Pp
29It is equivalent to:
30.Bd -literal -offset indent
31strtol(nptr, (char **)NULL, 10);
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 .
45