home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TPTOOL3.ZIP / ITOA.INC < prev    next >
Encoding:
Text File  |  1987-03-28  |  369 b   |  24 lines

  1.  
  2. #log Integer to ascii conversion
  3.  
  4. (*
  5.  * return the string equivelant of an integer value
  6.  * with leading zeroes for a minimum width of 2
  7.  *
  8.  *)
  9.  
  10. function itoa (int:           integer): anystring;
  11. var
  12.    tstr:          anystring;
  13.  
  14. begin
  15.    str(int, tstr);
  16.  
  17.    if length (tstr)= 1 then
  18.       itoa := '0' + tstr
  19.    else
  20.       itoa := tstr;
  21. end;
  22.  
  23.  
  24.