atom_chars(?Atom, ?Chars)

Chars is the list of character codes comprising the printed representation of Atom. Initially, either Atom must be instantiated to an atom, or Chars must be instantiated to a proper list of character codes.

If Atom is initially instantiated to an atom, Chars is unified with a list of the character codes that make up its printed representation. If Atom is uninstantiated and Chars is initially instantiated to a list of characters, Atom is instantiated to an atom containing exactly those characters, even if the characters look like the printed representation of a number. If the arguments to atom_chars/2 are both uninstantiated, an error is signalled.

atom_chars/2 was built into the system in Release 2.0. Before that, it was a library predicate. library(strings) still contains the old code under the name atom_chars1/2.