home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / MKSCREN2.ZIP / RJUST.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1987-04-10  |  435 b   |  14 lines

  1. {function that right justifies an input string
  2.  variable description:
  3.  str : the string that is to be right justified
  4.  fw : the field width in which the string is to be right justified
  5.  temp : a temporary string used by the function
  6. }
  7. function Rjust(str : str80;fc : char;fw : integer) : str80;
  8. var temp : str80;
  9. begin
  10.  temp[0] := chr(fw - length(str));
  11.  fillchar(temp[1],fw - length(str),fc);
  12.  Rjust := temp + str;
  13. end;
  14.