yields True if expr is an expression which cannot be divided into subexpressions, and yields False otherwise.
- You can use AtomQ in a recursive procedure to tell when you have reached the bottom of the tree corresponding to an expression.
- AtomQ gives True for symbols, numbers, strings, and other raw objects, such as sparse arrays.
- AtomQ gives True for any object whose subparts cannot be accessed using functions like Map.
Basic Examples (1)
Test if an expression cannot be subdivided:
Since it is not an atom, its parts can be extracted:
This is a number that is an atom:
Properties & Relations (1)
Introduced in 1988
Updated in 2003