home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / ansi / stdlib / atoi.txh < prev    next >
Encoding:
Text File  |  1995-07-10  |  539 b   |  31 lines

  1. @node atoi, string
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <stdlib.h>
  6.  
  7. int atoi(const char *string);
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. Convert as much of the string as possible to an equivalent integer
  13. value.
  14.  
  15. This function is almost like @code{(int)strtol(string, NULL, 10)}
  16. (@pxref{strtol}).
  17.  
  18. @subheading Return Value
  19.  
  20. The equivalent value, or zero if the string does not represent a number. 
  21.  
  22. @subheading Example
  23.  
  24. @example
  25. main(int argc, char **argv)
  26. @{
  27.   int i = atoi(argv[1]);
  28.   @dots{}
  29. @end example
  30.  
  31.