home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / pxg.zip / PXG.INC < prev    next >
Text File  |  1985-10-19  |  975b  |  62 lines

  1.  
  2.  
  3.  
  4. (* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  5.  *
  6.  *  PXG.INC - Include file used by all experts generated
  7.  *  by the Pascal Expert Generator.
  8.  *
  9.  *
  10.  *  4-Oct-85 S.H.Smith
  11.  *
  12.  *)
  13.  
  14. type
  15.    anystring = string[80];
  16.  
  17.  
  18.  
  19. (* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  20.  *
  21.  * ask a yes/no question
  22.  *
  23.  * returns true if the answer is yes
  24.  *
  25.  *)
  26.  
  27. function ask(question: anystring): boolean;
  28. var
  29.    answer: char;
  30.  
  31. begin
  32.    repeat
  33.       write(question,' (Y/N) ');
  34.  
  35.       read(kbd,answer);
  36.       answer := upcase(answer);
  37.       writeln(answer);
  38.  
  39.       if not (answer in ['Y','N']) then
  40.          writeln('Please answer the question!');
  41.  
  42.    until answer in ['Y','N'];
  43.  
  44.    ask := (answer = 'Y');
  45. end;
  46.  
  47.  
  48.  
  49. (* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  50.  *
  51.  * make a conclusion
  52.  *
  53.  *)
  54.  
  55. procedure conclude(conc: anystring);
  56. begin
  57.    writeln;
  58.    writeln('Conclusion: ',conc);
  59.    writeln;
  60. end;
  61.  
  62.