English
Language : 

CC78K0S Datasheet, PDF (211/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 10 LIBRARY FUNCTIONS
5-1 atoi
atol
Utility Functions
FUNCTION
The string function atoi converts the contents of a decimal integer string to an int value.
The string function atol converts the contents of a decimal integer string to a long int value.
HEADER
stdlib.h
FUNCTION PROTOTYPE
int atoi(const char *nptr);
long int atol(const char *nptr);
Function
atoi
atol
Arguments
nptr... String to be converted
Return Value
• int value if converted
properly
• INT_MAX (32767) if positive
overflow occurs
• INT_MIN (–32768) if
negative overflow occurs
• 0 if the string is invalid
• long int value if converted
properly;
• LONG_MAX (2147483647)
for positive overflow;
• LONG_MIN (–2147483648)
for negative overflow;
• 0 if the string is invalid
User’s Manual U14872EJ1V0UM
211