atoi


Conversion of character string to integer (int type)

[Classification]

Standard library

[Syntax]

#include <stdlib.h>

int __far atoi(const char __near *nptr);

int __far _COM_atoi_f(const char __far *nptr);

[Return value]

Returns the converted value if the partial character string could be converted. If it could not, 0 is returned.

If an overflow occurs, atoi returns INT_MAX for a positive value and INT_MIN for a negative value, and sets macro ERANGE to global variable errno.

[Description]

This function converts the first part of the character string indicated by nptr into an int type in the decimal representation.