0
votes

I am new to prolog. I have a .pl file consulting normally on swi-prolog, but when I consult it on tu-prolog, crazy things always happen. Here are parts of my codes.

    :- dynamic(assignopT/6).
    :- multifile(assignopT/6).
    assignopT(30246,30244,30210,30247,+,30248).

When I consulted it on tu-prolog,it said syntax error at/before line 12219,which is the third line above. It work all right on swi-prolog. Then I thought maybe there is something wrong with +, so I changed it to this.

    assignopT(30246,30244,30210,30247,'+',30248).

This time,it said syntax error at/before line -1. I really don't get this, what line -1 even suppose to mean. The .pl named swi2tu.pl is on https://drive.google.com/folderview?id=0B4KCEwRVmr_yWjQwOEp3LWpYdk0&usp=sharing

1

1 Answers

1
votes

Try instead:

assignopT(30246,30244,30210,30247,(+),30248).

Writing an atom, such as +, between single quotes changes nothing and the error is possibly due to its operator status. Assuming that's the case, writing it between ()'s should fix the possible operator conflict when loading the code in tuProlog (not Turbo Prolog, I assume!).