home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l217 / 2.ddi / EXAMPLES / CH07EX01.PRO < prev    next >
Encoding:
Prolog Source  |  1990-03-26  |  472 b   |  21 lines

  1. /*
  2.    Copyright (c) 1986, 90 by Prolog Development Center
  3. */
  4.    
  5. predicates
  6.    country(symbol)
  7.    print_countries
  8.  
  9. clauses
  10.    country(england).
  11.    country(france).
  12.    country(germany).
  13.    country(denmark).
  14.  
  15.    print_countries :- country(X),
  16.                      write(X),                        /* write the value of X */
  17.                      nl,                                  /* start a new line */
  18.                      fail.
  19.  
  20.    print_countries.
  21.