[ ECLiPSe Term Comparison built-in.|Group Index| Full Index]

?Term1 == ?Term2

Succeeds if Term1 and Term2 are identical terms.

?Term1
Prolog term.
?Term2
Prolog term.

Description

Used to compare Term1 with Term2. Succeeds if Term1 and Term2 are identical terms. It does not attempt unification. Two variables are considered as identical only if one is bound to the other, or if they are both bound to identical terms. Ground terms are identical only if they unify.

Fail Conditions

Fails if Term1 and Term2 are not identical.

Resatisfiable

No.

Exceptions

Examples


   Success:
   atom == atom.
   1 == 1.
   X == X.                      (gives X = _g70)
   X = 1, Y = 1, Y == X.        (gives X = 1, Y = 1)
   X = Y, X == Y, Y == X.       (gives Y = _g80, X = _g80)
   [ a,b| [ ] ] == [ a,b ].
   f(1,2) == f(1,2).
   Fail:
   atom == neutron.
   atom == X.
   1 == 1.0.
   X == Y.
   [a|b] == [a,b].
   [a|X] == [a,X].


See Also

\== / 2, = / 2