Commit | Line | Data |
---|---|---|
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 | |
11 | atol \- convert ASCII string to long integer | |
12 | .SH SYNOPSIS | |
13 | .nf | |
14 | .ft B | |
15 | #include <stdlib.h> | |
16 | ||
17 | long | |
18 | atol(const char *nptr); | |
19 | .ft R | |
20 | .fi | |
21 | .SH DESCRIPTION | |
22 | The | |
23 | .I atol | |
24 | function converts the initial portion of the string pointed to by | |
25 | .I nptr | |
26 | to | |
27 | .I long integer | |
28 | representation. | |
29 | .PP | |
30 | It is equivalent to: | |
31 | .sp | |
32 | .RS | |
33 | strtol(nptr, (char **)NULL, 10); | |
34 | .RE | |
35 | .SH SEE ALSO | |
36 | atof(3), atoi(3), strtod(3), strtol(3), strtoul(3) | |
37 | .SH STANDARDS | |
38 | .B Atol | |
39 | conforms to ANSI X3.159-1989 (``ANSI C''). |