macro and text revision (-mdoc version 3)
[unix-history] / usr / src / lib / libc / stdlib / atol.3
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" %sccs.include.redist.man%
.\"
.\" @(#)atol.3 5.2 (Berkeley) %G%
.\"
.Dd
.Dt ATOL 3
.Os
.Sh NAME
.Nm atol
.Nd convert
.Tn ASCII
string to long integer
.Sh SYNOPSIS
.Fd #include <stdlib.h>
.Ft long
.Fn atol "const char *nptr"
.Sh DESCRIPTION
The
.Fn atol
function converts the initial portion of the string pointed to by
.Ar nptr
to
.Em long integer
representation.
.Pp
It is equivalent to:
.Bd -literal -offset indent
strtol(nptr, (char **)NULL, 10);
.Ed
.Sh SEE ALSO
.Xr atof 3 ,
.Xr atoi 3 ,
.Xr strtod 3 ,
.Xr strtol 3 ,
.Xr strtoul 3
.Sh STANDARDS
The
.Fn atol
function
conforms to
.St -ansiC .