SilverScreen Solid Modeler



Previous topic Next topic  


Previous topic Next topic JavaScript is required for the print function  



int atoi( char *s )


char *s;      /* string to be converted */





#include "stdlib.h"


The atoi function returns the value of an ASCII text string representation of an integer. atoi stops reading the input string at the first character that it cannot recognize as part of a number.




s should be a null-terminated string with the following format:




where [whitespace] is a sequence of tab or space characters, [sign] is either plus ('+') or minus ('-'), and [digits] is one or more decimal digits.



Return Value

If s is empty, or no digits are found, then atoi returns 0. If the result overflows, then the return value is undefined.



See Also

atol , atof