ch05ex04.pro

来自「prolog,人工智能推理程序,运行环境prolog」· PRO 代码 · 共 25 行

PRO
25
字号
/*
   Turbo Prolog 2.0 Chapter 5, Example Program 4
   
   Copyright (c) 1986, 88 by Borland International, Inc
   
*/
   
domains
   name, thing = symbol

predicates
   likes(name, thing)
   reads(name)
   is_inquisitive(name)

clauses
   likes(john, wine).
   likes(lance, skiing).
   likes(Z, books) :-
      reads(Z), is_inquisitive(Z).
   likes(lance, books).
   likes(lance, films).

   reads(john).
   is_inquisitive(john).

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?