11.2.21 Term Handling

?T =.. ?L   ISO

the functor and arguments of term T comprise the list L

?X = ?Y   ISO

terms X and Y are unified

+X \= +Y   ISO

terms X and Y no not unify


X and Y are either strictly identical or don’t unify

acyclic_term(+T)   since release 4.3, ISO

term T is a finite (acyclic) term

arg(+N,+T,-A)   ISO

the Nth argument of term T is A

atom_chars(?A,?L)   ISO

A is the atom containing the character atoms in list L

atom_codes(?A,?L)   ISO

A is the atom containing the characters in code-list L

atom_concat(?Atom1,?Atom2,?Atom12)   ISO

Atom Atom1 concatenated with Atom2 gives Atom12.

atom_length(+Atom,-Length)   ISO

Length is the number of characters of the atom Atom.

char_code(?Char,?Code)   ISO

Code is the character code of the one-char atom Char.

copy_term(+T,-C)   ISO

C is a copy of T in which all variables have been replaced by new variables


C is a copy of T in which all variables have been replaced by new variables, and G is a goal for reinstating any attributes in C


Mutable is a new mutable term with current value Datum.


X and Y are constrained to be different.


The goal Goal is blocked on the variable Var.

functor(?T,?F,?N)   ISO

the principal functor of term T has name F and arity N


The current value of the mutable term Mutable is Datum.


the code-list of atom or number A is L

number_chars(?N,?L)   ISO

N is the numeric representation of list of character atoms L

number_codes(?N,?L)   ISO

N is the numeric representation of code-list L


number the variables in term T from M to N-1

sub_atom(+Atom,?Before,?Length,?After,?SubAtom)   ISO

The characters of SubAtom form a sublist of the characters of Atom, such that the number of characters preceding SubAtom is Before, the number of characters after SubAtom is After, and the length of SubAtom is Length.

subsumes_term(General,Specific)   since release 4.3, ISO

Specific is an instance of General

term_variables(+Term,-Variables)   since release 4.3, ISO

Variables is the set of variables that occur in Term

unify_with_occurs_check(?X,?Y)   ISO

True if X and Y unify to a finite (acyclic) term.

Send feedback on this subject.