Re: simple example please, facts and query in one file

"Michał Bieliński" <[email protected]>
Newsgroups gmane.comp.gnu.prolog.general
Message-ID <[email protected]>
Dnia 19 Listopada 2013, 20:25, Wt, Patrick napisał:
> ALL LOGICAL BUT IF I TYPE :
>
> | ?- sally(tall) .
> uncaught exception: error(existence_error(procedure,sally/1),top_level/0)
> | ?-
>
> I am not sure how I could add new facts without putting them in a
> separate file.

Ah, you want to add facts directly from the interpreter!

Try this:

consult(user).

It means to consult a file which will be typed in its entirety from
keyboard by the user. Write all the facts you want and finish with end
sequence specific for your platform.  CTRL+Z, Enter on Windows or CTRL+D
almost everywhere else.

-- 
Michał Bieliński
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.