Reputation: 43833
In swi-prolog, I loaded a file which just has this:
% -*- Mode : Prolog -*-
sunny.
In the terminal, if I do
?- sunny.
It says true
. But if I do
?- fff.
I expect it to say false
, but it instead says
ERROR: Undefined procedure: fff/0 (DWIM could not correct goal)
This site http://www.doc.gold.ac.uk/~mas02gw/prolog_tutorial/prologpages/facts.html when doing the example with foggy.
, it says output should be no
, but I get an error.
Does anyone know what's wrong?
Thanks
Upvotes: 0
Views: 1637
Reputation: 121
You are telling prolog to execute a command that does not exist. If you were to have a file with only:
weather(sunny).
then running the command
weather(foggy).
would return false.
Upvotes: 2