home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TOOL_INC.ZIP / ITOA.INC < prev    next >
Encoding:
Text File  |  1988-01-29  |  332 b   |  22 lines

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