home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / AIE8911.ZIP / LISTING.3 < prev    next >
Encoding:
Text File  |  1989-08-28  |  774 b   |  33 lines

  1.  
  2.  
  3.  
  4.                      Listing 3
  5.  
  6.                 THE STUB INTERPRETER
  7.  
  8.  
  9.  
  10.               % stub execution when stub is a boolean decision
  11. do_stub( Stub ) :-
  12.               % does the stub describe a boolean decision
  13.       is_a_boolean( Stub),
  14.       !,
  15.               % then ask the user a boolean question
  16.               % generated from the stub
  17.       yes(  question_prompt( Stub) ,
  18.             q_means_no,
  19.             do_quit  )  .
  20.  
  21.               % stub execution when stub is a loop
  22. do_stub( Stub ) :-
  23.       is_a_loop( Stub),
  24.       !,
  25.       do_a_loop( Stub).
  26.  
  27.               % stub execution when stub is an action
  28. do_stub( Stub ) :-
  29.       display_purpose( Stub),
  30.       !.
  31.  
  32. ---------------- end of listing -----------------------------------
  33.