All Manuals > 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 (Windows version) - 24 Mar 2017

NextPrevUpTopContentsIndex