KnowledgeWorks and Prolog User Guide > A Common Prolog

NextPrevUpTopContentsIndex

A.4 Using The Logic Interpreter

The Common Prolog system comes with a built-in read-query-print loop similar to a Prolog interpreter loop. To run it, make sure the common-prolog package is accessible and type: (rqp) . You will be presented with the prompt: ==> . At this point you may type in goal expressions, for example:

|==> (append ?x ?y (1 2))
|
|?X = NIL
|?Y = (1 2)

Now Common Prolog is waiting for you to indicate whether or not you wish more solutions. If you press Return , you will get the message OK and return to the top level:

|?X = NIL
|?Y = (1 2)<RETURN>
|
|OK.
|
|==>

A.4.1 Multiple Solutions

A.4.2 Multiple Goals

A.4.3 Definitions

A.4.4 Exiting the Interpreter


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

NextPrevUpTopContentsIndex