Comparison and unification of arbitrary terms. Terms are ordered in the so called ``standard order''. This order is defined as follows:
If the prolog_flag (see current_prolog_flag/2) iso
is defined, all floating point numbers precede all integers.
\+
Term1 == Term2
.
1 ?- A = f(A). A = f(f(f(f(f(f(f(f(f(f(...)))))))))) 2 ?- unify_with_occurs_check(A, f(A)). No |
I.e. the first creates a cyclic-term, which is printed as an
infinitely nested f/1 term (see the max_depth
option of write_term/2).
The second executes logically sound unification and thus fails.
\+
Term1 = Term2
.
a =@= A false A =@= B true x(A,A) =@= x(B,C) false x(A,A) =@= x(B,B) true x(A,B) =@= x(C,D) true
`\+
Term1 =@= Term2'
.
<
, >
or =
, with the obvious meaning.