"Not equal" sign in Visual Prolog?

Egor picture Egor · Sep 20, 2011 · Viewed 89k times · Source

I can't find any documentation on "not equal" sign in Visual Prolog. Please provide the right solution of this problem:

class predicates
        sister : (string Person, string Sister) nondeterm(o,o).
    clauses
        sister(Person, Sister) :-
            Person [not-equal-sign] Sister,
            parent(Person, Parent),
            parent(Sister, Parent),
            woman(Sister).

Answer

Kaarel picture Kaarel · Sep 20, 2011

I don't know what do you mean by "not equal" (does not unify?), but you could try these:

X \= Y
not(X = Y)
\+ (X = Y)