Home Contents Index Previous Next

4.5 Verify Type of a Term

var(+Term)
Succeeds if Term currently is a free variable.

nonvar(+Term)
Succeeds if Term currently is not a free variable.

integer(+Term)
Succeeds if Term is bound to an integer.

float(+Term)
Succeeds if Term is bound to a floating point number.

rational(+Term)
Succeeds if Term is bound to a rational number. Rational numbers include integers.

rational(+Term, -Numerator, -Denominator)
True if Term is a rational number with given Numerator and Denominator. The Numerator and Denominator are in canonical form, which means Denominator is a positive integer and there are no common divisors between Numerator and Denominator.

number(+Term)
Succeeds if Term is bound to an integer or floating point number. (23)

atom(+Term)
Succeeds if Term is bound to an atom.

string(+Term)
Succeeds if Term is bound to a string.

atomic(+Term)
Succeeds if Term is bound to an atom, string, integer or floating point number.

compound(+Term)
Succeeds if Term is bound to a compound term. See also functor/3 and =../2.

callable(+Term)
Succeeds if Term is bound to an atom or a compound term, so it can be handed without type-error to call/1, functor/3 and =../2.

ground(+Term)
Succeeds if Term holds no free variables.

cyclic_term(+Term)
Succeeds if Term contains cycles, i.e. is an infinite term. See also acyclic_term/1 and section 2.16. (24)

acyclic_term(+Term)
Succeeds if Term does not contain cycles, i.e. can be processed recursively in finite time. See also cyclic_term/1 and section 2.16.