Tim Finin (email@example.com)
Tue, 18 Mar 2003 12:58:29 -0500
Tom Armstrong wrote:
> Here's my naive question of the day:
> I want to make a comparison between two initially uninstantiated
> variables. Take the rule to be foo(X) :- A=clause1,B=clause2,A>B., say.
> XSB doesn't care for my attempt and tells me about it.
> The closest documentation I can find is in the constraint solving section.
> Interestingly, their sample code doesn't perform as they claim on my
> installation nor cs.
The > operator on XSB complains unless it's two arguments
are numbers. So, for A>B to work, A and B must both be instantiated
to numbers. This error is only caught at run time. If you want
a more general term comparison operator (e.g., for lexicographic
ordering) try compare/3 (http://xsb.sourceforge.net/manual1/node87.html#10188).
This archive was generated by hypermail 2.0b3 on Tue Mar 18 2003 - 12:58:35 EST