\=/2

tests whether two terms are not unifiable.

?Term1 \= ?Term2
\=(?Term1, ?Term2)

'\='/2 succeeds when Term1 and Term2 are not unifiable and fails if they are unifiable.

'\='/2 is a predefined infix-operator with priority 700 which is non-associative (see also current_op/3).

Arguments

Term1                  term
Term2                  term

Examples

\=(7,7.00). Succeeds.
X=a, f(X,b) \= f(b,b). Succeeds.
f(g(X),X) \= f(Y,write(a)). Fails.

Standard

This predicate is part of the ISO-Prolog Standard.

See also

'='/2, unify_with_occurs_check/2.


Up read on...