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

  1. @node itoa, string
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <stdlib.h>
  6.  
  7. char * itoa(int value, char *string, int radix)
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. This function converts its argument @var{value} into a null-terminated
  13. character string using @var{radix} as the base of the number system.  The
  14. resulting string with a length of upto 33 bytes (including the optional
  15. sign and the terminating @code{NULL} is put into the buffer whose address
  16. is given by @var{string}.  For radixes other than 10, @var{value} is
  17. treated as an unsigned int (i.e., the sign bit is not interpreted as
  18. such).  The argument @var{radix} should specify the base, between 2 and
  19. 36, in which the string reprsentation of @var{value} is requested.
  20.  
  21. @subheading Return Value
  22.   
  23. A pointer to @var{string}.
  24.  
  25. @subheading Example
  26.  
  27. @example
  28. char binary_str[33];
  29.  
  30. (void)itoa(num, binary_str, 2);
  31. @end example
  32.  
  33.