[Previous]
[Contents]
[Next]

atol()

convert a string to long integer representation

Synopsis:

#include <stdlib.h>

long int atol( const char *ptr );

Description:

The atol() function converts the string pointed to by ptr to long int representation.

Returns:

The converted value.

Examples:

#include <stdlib.h>

void main()
  {
    long int x;

    x = atol( "-289" );
  }

Classification:

ANSI

Safety:
Interrupt handler Yes
Signal handler Yes
Thread Yes

See also:

atoi(), itoa(), ltoa(), sscanf(), strtol(), strtoul(), ultoa(), utoa()


[Previous]
[Contents]
[Next]