home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / simtel / sigm / vols000 / vol023 / sigmv023.ark / PADSTR.LIB < prev    next >
Text File  |  1984-04-29  |  495b  |  24 lines

  1.  
  2. {    PADSTRING
  3.  
  4.     Pads a string out to the indicated blanks using spaces,
  5.     since Pascal/Z now justifies string to the right.
  6.     If length(str) equals or exceeds the requested size no
  7.     action is taken.
  8.  
  9.     Requires the following gobal declarations:
  10.         TYPE    string255 = string 255;
  11.             byte = 0..255;
  12. }
  13.  
  14. PROCEDURE padstr (VAR str : string255; size : byte);
  15.  
  16. VAR    count : byte;
  17.  
  18. begin
  19.     if (length(str) < size) then
  20.         for count := succ(length(str)) to size do
  21.             append (str,' ')
  22. end;
  23.  
  24.