www.delorie.com/djgpp/doc/libc-2.02/libc_51.html   search  
Go to the first, previous, next, last section, table of contents.


atol

Syntax

#include <stdlib.h>

long atol(const char *string);

Description

Convert as much of the string as possible to an equivalent long integer value.

This function is almost like strtol(string, NULL, 10) (see section strtol).

Return Value

The equivalent value, or zero if the string does not represent a number.

Portability

ANSI, POSIX

Example

main(int argc, char **argv)
{
  long l = atol(argv[1]);
  ...


Go to the first, previous, next, last section, table of contents.

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright © 1998   by DJ Delorie     Updated Dec 1998  

Please take a moment to fill out this visitor survey
You can help support this site by visiting the advertisers that sponsor it! (only once each, though)