When I entuer in gnu prolog:
man (adam).
I get the following error:
uncaught exception: error(syntax_error('user_input:1 (char:5) . or operator
expected after expression'),read_term/3)
That would be entering a fact.
What am I doing wrong ?
Thanks
You try to query fact man/0, but you didn't have any facts in
database, so you get existence_error.
So you can either declare fact: ?- assertz(man(adam)).
or consult Prolog source file containing your facts, man(adam). or
man(X).
Regards,
Tomasz Budzeń
This is something of a quirk/feature of gprolog.
Many implementations will return "no" or "false"
in such a case.
[GNU Prolog: Existence error]
http://www.gprolog.org/manual/gprolog.html#htoc40
Existence errors can be "caught" and handled by a
user supplied predicate.
This behavior can be changed by setting of a Prolog
flag called "unknown". See here for the possible
values of that changeable flag:
http://www.gprolog.org/manual/gprolog.html#set-prolog-flag/2
regards, chip