| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| I need to translate the following code, that prints out the SLD tree, from SWI-Prolog to Sictsus. It is part of the graphviz.pl file that can be found at : http://www.cs.bris.ac.uk/Teaching/Re...0106/graphviz/ The problem are these two lines when I try to load it in Sicstus 4.0.4: writes(:-A) :- !,write(':-'),writes(A). writes(?-A) :- !,write('?-'),writes(A). Sicstus is telling me: ! Syntax error ! , or ) expected in arguments ! in line 90 ! writes ( :- ! <<here>> ! A ) :- ! , write ( :- ) , writes ( A ) . ! Approximate lines: 89-91, file: '/....../graphviz_sic.pl' ! Syntax error ! , or ) expected in arguments ! in line 91 ! writes ( ?- ! <<here>> ! A ) :- ! , write ( ?- ) , writes ( A ) . Do I need an escape charcter for the :- so it works and if so, which one is it? Thanks, Michael |
|
#2
| |||
| |||
| On 2008-07-14, Michael Igler <michael.igler@web.de> wrote: > I need to translate the following code, that prints out the SLD tree, > from SWI-Prolog to Sictsus. It is part of the graphviz.pl file that can > be found at : > > http://www.cs.bris.ac.uk/Teaching/Re...0106/graphviz/ > > > The problem are these two lines when I try to load it in Sicstus 4.0.4: > > writes(:-A) :- !,write(':-'),writes(A). > writes(?-A) :- !,write('?-'),writes(A). This should run on any Prolog system: writes(:-(A)) :- !,write((:-)),writes(A). --- Jan |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.