atom (AutoLISP)

Verifies that an item is an atom

Supported Platforms: Windows and Mac OS

Signature

(atom item)
item

Type: Symbol

Any AutoLISP element.

Some versions of LISP differ in their interpretation of atom, so be careful when converting from non-AutoLISP code.

Return Values

Type: T or nil

nil if item is a list; otherwise T. Anything that is not a list is considered an atom.

Examples

(setq a '(x y z))
(X Y Z)

(setq b 'a)
A

(atom 'a)
T

(atom a)
nil

(atom 'b)
T

(atom b)
T

(atom '(a b c))
nil