11.3.15 atom_chars/2 [ISO]

Synopsis

atom_chars(+Atom, -Chars)

atom_chars(-Atom, +Chars)

Chars is the chars comprising the printed representation of Atom.

Arguments

Chars
chars

The chars comprising the printed representation of Atom.

Atom
atom

The atom containing exactly those characters, even if the characters look like the printed representation of a number.

Description

Initially, either Atom must be instantiated to an atom, or Chars must be instantiated to a proper chars.

Any atom that can be read or written by Prolog can be constructed or decomposed by atom_chars/2.

Exceptions

instantiation_error
Atom and Chars are both uninstantiated
type_error
Atom is not a number or Chars is not a list, or Chars is not a chars
representation_error
Chars is a list corresponding to an atom that can't be represented

See Also

atom_codes/2.


Send feedback on this subject.