atom(?term) [ISO]

This clause tests if it's argument is an atom or not. If the type of the term is atom then the predicate is exited else failing starts.

see also: atomic/1 compound/1 float/1 integer/1 instance/1 nonvar/1 number/1 var/1

Examples
atom("hello"). succeeds
atom([]). succeeds
atom(num). succeeds
atom([a]). fails
atom(f(X). fails

 

 

info@trinc-prolog.com