home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / simtel / sigm / vols000 / vol023 / prompt.lib < prev    next >
Text File  |  1984-04-29  |  643b  |  31 lines

  1.  
  2. {    PROMPT
  3.  
  4.     Takes message, formats into fixed length string, and
  5.     writes it to the console.
  6.     The calling program passes the prompt and will handle actual
  7.     date input.
  8.  
  9.     Requires globally declared
  10.         TYPE    string255 = string 255
  11.         FUNCTION length;
  12. }
  13.  
  14. PROCEDURE prompt (msg : string255);
  15.  
  16. CONST    msglength = 12;    { should be longer than longest message }
  17.     leader = '.';    { could be a space if desire }
  18.     endprompt = ' =>  ';
  19.  
  20. VAR    count : integer;
  21.     esc : char;
  22.  
  23. begin
  24.     append (msg,' ');
  25.     if length(msg) < msglength then
  26.         for count := succ(length(msg)) to msglength do
  27.             append (msg,leader);
  28.     write (msg,endprompt)
  29. end;
  30.  
  31.