home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lifeos2.zip / LIFE-1.02 / TESTS / LF / FEATVAL.LF < prev    next >
Text File  |  1996-06-04  |  690b  |  44 lines

  1. module("phew")?
  2. private_feature(view)?
  3. public(p)?
  4. public(q)?
  5.  
  6. p(X) :- X.view=you_cant_see_me.
  7.  
  8. q(X) :- write("right to the horizon here: "),nl,
  9.     write("    ",features(X)),nl,
  10.     write("    ",feature_values(X)),nl,
  11.     (write("    ",X.view),nl,fail;succeed).
  12.  
  13.  
  14.  
  15. module("you")?
  16. open("phew")?
  17. public(r)?
  18. r(X) :- X.view=look_at_the_C, X.joke=this_isn_t_funny.
  19.  
  20.  
  21.  
  22. module("me")?
  23. open("phew")?
  24. open("you")?
  25. public(go)?
  26.  
  27.  
  28. s(X) :- write("limited outlook here: "),nl,
  29.     write("    ",features(X)),nl,
  30.     write("    ",feature_values(X)),nl,
  31.     write("    ",X.view),nl.
  32.  
  33.  
  34. show(X) :- nl,nl,write("term: ",X),nl,s(X),q(X).
  35.  
  36.  
  37. go :-
  38.     X=this(view=>@(it_s_blue),charley=>brown,one,two,three),
  39.     show(X),
  40.     r(X),
  41.     show(X),
  42.     p(X),
  43.     show(X).
  44.