atomic/1

tests whether the argument is an atom or a number.

atomic(+Term)

atomic/1 succeeds if Term is an atom or a number otherwise it fails.

Arguments

Term                   term

Examples

atomic('this is an atom'). Succeeds.
atomic(15.27). Succeeds.
atomic(Var). Fails.
atomic(f(x,y)). Fails.

Standard

This predicate is part of the ISO-Prolog Standard.

See also

atom/1, compound/1, float/1, integer/1, nonvar/1, number/1, var/1.


Up read on...