KnowledgeWorks and Prolog User Guide > A Common Prolog > A.4 Using The Logic Interpreter

NextPrevUpTopContentsIndex

A.4.3 Definitions

It is possible to type logic definitions directly into the interpreter. The resulting Lisp code will be compiled in memory and you may use the definition immediately, for example.:

|==> (defrel color
|      ((color red))
|      ((color blue))
|      ((color green)))
|
|<... various compilation messages ...>
|
|YES.
|OK.
|
|==> (color ?x)
|
|?X = RED

KnowledgeWorks and Prolog User Guide (Unix version) - 22 Dec 2009

NextPrevUpTopContentsIndex