.\" Copyright (c) 1990, 1991 The Regents of the University of California. .\" All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" the American National Standards Committee X3, on Information .\" Processing Systems. .\" .\" %sccs.include.redist.man% .\" .\" @(#)atol.3 5.3 (Berkeley) 06/29/91 .\" .Dd .Dt ATOL 3 .Os .Sh NAME .Nm atol .Nd convert .Tn ASCII string to long integer .Sh SYNOPSIS .Fd #include .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 .