Syntax Error in GNU Prolog 1.2.16
- From: amill123@xxxxxxxxx
- Date: 13 Dec 2006 00:46:47 -0800
I have some facts in a program that I am running under GNU Prolog that
I am trying to declare as dynamic. Here are the facts:
:- dynamic(loc_list/2).
loc_list([apple, broccoli, crackers], kitchen).
:- dynamic(turned_off/1).
turned_off(flashlight).
:- dynamic(here/1).
here(kitchen).
:- dynamic(door_closed/2).
door_closed(kitchen, cellar).
When I try to run:
consult('myadven.pro').
....in the listener I get the following error for each of the above
facts:
error: syntax error: previous operator needs brackets (char:<a number>)
....where <a number> seems to indicate the position where the error
occurs. In each of these facts, the error is occurring immediately
after the '/' character.
I also get a similar bracket error for the following:
can_take(Thing) :-
Thing = door,
write('You can''t take a door.'), % Error occurs here!
...
And a bracket error here as well:
can_take(Thing) :-
(not(Thing = door)), % Error occurs here!
write('There is no '),
...
In both of these rules the error is occuring immediately before the ','
following the 'X = X' query.
I cannot figure out why these errors are occurring. I don't see
anything wrong with my syntax; it compiled fine on Amzi! Prolog but I
need it to work on GNU Prolog. Any help is GREATLY appreciated!
.
- Follow-Ups:
- Re: Syntax Error in GNU Prolog 1.2.16
- From: Jerome Abela
- Re: Syntax Error in GNU Prolog 1.2.16
- From: Darren Bane
- Re: Syntax Error in GNU Prolog 1.2.16
- Prev by Date: Re: Getting status of a free variable.
- Next by Date: Re: Out of stack problem
- Previous by thread: Out of stack problem
- Next by thread: Re: Syntax Error in GNU Prolog 1.2.16
- Index(es):
Relevant Pages
|
|