English
Language : 

CC78K4 Datasheet, PDF (195/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 10 LIBRARY FUNCTIONS
atoi,
atol
Utility Functions
EXPLANATION
atoi
• The atoi function converts the first part of the string pointed to by pointer “nptr” to an int value. The string
may consist of zero or more white-space characters possibly followed by a minus or plus sign, followed by a
string of digits.
• The atoi function skips over zero or more white-space characters (for which isspace becomes true) from the
beginning of the string and converts the string from the character next to the skipped white-spaces to an int
value (until other than digits or a null character appears in the string).
• If no digits to convert are found in the string, the function returns 0. If an overflow occurs, the function returns
INT_MAX (32767) for a positive overflow and INT_MIN (−32768) for a negative overflow.
atol
• The atol function converts the first part of the string pointed to by pointer “nptr” to a long value. The string
may consist of zero or more white-space characters, possibly followed by a minus or plus sign, followed by a
string of digits.
• The atol function skips over zero or more white-space characters (for which isspace becomes true) from the
beginning of the string and converts the string from the character next to the skipped white-spaces to a long
value (until other than digits or null character appears in the string).
• If no digits to convert are found in the string, the function returns 0. If an overflow occurs, the function returns
LONG_MAX (2147483647) for a positive overflow and LONG_MIN (−2147483648) for a negative overflow.
User’s Manual U15556EJ1V0UM
195