Previous Contents Next
7.2 Term unification

7.2.1 (=)/2 - Prolog unification
[default](=)/2@(=)/2|textbf7.2.1htoc
Templates

=(?term, ?term)
Description

Term1 = Term2 unifies Term1 and Term2. No occurs check is done, i.e. this predicate does not check if a variable is unified with a compound term containing this variable (this can lead to an infinite loop).

= is a predefined infix operator (section 7.14.10).

Errors

None.

Portability

ISO predicate.

7.2.2 unify_with_occurs_check/2
[default]unify_with_occurs_check/2@unify_with_occurs_check/2|textbf7.2.2htoc
Templates

unify_with_occurs_check(?term, ?term)
Description

unify_with_occurs_check(Term1, Term2) unifies Term1 and Term2. The occurs check test is done (i.e. the unification fails if a variable is unified with a compound term containing this variable).

Errors

None.

Portability

ISO predicate.

7.2.3 (\=)/2 - not Prolog unifiable
[default](\=)/2@(\=)/2|textbf7.2.3htoc
Templates

\=(?term, ?term)
Description

Term1 \= Term2 succeeds if Term1 and Term2 are not unifiable (no occurs check is done).

\= is a predefined infix operator (section 7.14.10).

Errors

None.

Portability

ISO predicate.


Copyright (C) 1999-2001 Daniel Diaz

Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.

More about the copyright
Previous Contents Next