3.2.1. atoi

Converts a string to an integer.

Syntax:

int atoi (str)
char *str;

where:

str

The string to be converted.

Description

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

Return value

The integer value of the converted string.

Example

add char strValue[10]
cexpression strcpy(strValue,"10000")
printf "%d", atoi(strValue)

See also

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