home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l210 / 1.ddi / EXAMPLES.ARC / CH06EX04.PRO < prev    next >
Encoding:
Prolog Source  |  1988-06-21  |  540 b   |  23 lines

  1. /*
  2.    Turbo Prolog 2.0 Chapter 6, Example Program 4
  3.    
  4.    Copyright (c) 1986, 88 by Borland International, Inc
  5.    
  6. */
  7.    
  8. domains
  9.    articles            = book(title, author) ; 
  10.                          horse(name) ; boat ; 
  11.                          bankbook(balance)
  12.    title, author, name = symbol
  13.    balance             = real
  14.  
  15. predicates
  16.    owns(name,articles)
  17.  
  18. clauses
  19.    owns(john, book("A friend of the family", "Irwin Shaw")).
  20.    owns(john, horse(blacky)).
  21.    owns(john, boat).
  22.    owns(john, bankbook(1000)).
  23.