[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 1

atol or atoll Subroutine

Purpose

Converts a string to a long integer.

Syntax

#include <stdlib.h>

long long atoll (nptr)
const char *nptr;

long atol (nptr)
const char *nptr;

Description

The atoll and atol subroutines (str) are equivalent to strtoll(nptr, (char **)NULL, 10) and strtol(nptr, (char **)NULL, 10), respectively. If the value cannot be represented, the behavior is undefined.

Parameters

nptr Points to the string to be converted into a long integer.

Return Values

The atoll and atol subroutines return the converted value if the value can be represented.

Related Information

strtol, strtoul, strtoll, strtoull, or atoi Subroutine in AIX 5L Version 5.2 Technical Reference: Base Operating System and Extensions Volume 2.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]