atomic(?term) [ISO]

This clause succeeds if it's argument is an atom, a floating point or an integer number. If this is so then the predicate is exited, else failing starts.

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

Examples
atomic("hello"). succeeds
atomic(-10.1) succeeds
atomic(9). succeeds
atomic([a]). fails
atomic(f(X)). fails

 

 

info@trinc-prolog.com