3.2.2. atol

Converts a string to a long integer.

Syntax:

long atol (str)
char *str;

where:

str

The string to be converted.

Description

This macro converts a string of numbers to the equivalent long integer value.

Return value

The long integer value of the converted string.

Example

add char strValue[10]
cexpression strcpy(strValue,"-1")
printf "%d", atol(strValue)

See also

Copyright © 2002-2009 ARM Limited. All rights reserved.ARM DUI 0175K
Non-Confidential