users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Michał Bieliński
Subject: Re: simple example please, facts and query in one file
Date: Tue, 19 Nov 2013 22:09:43 +0100
User-agent: SquirrelMail/1.4.21

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]