Next: mpg-ref-atom_codes, Previous: mpg-ref-atom, Up: mpg-bpr [Contents][Index]
atom_chars/2
ISOatom_chars(+Atom, -Chars)
atom_chars(-Atom, +Chars)
Chars is the chars comprising the printed representation of Atom.
chars
The chars comprising the printed representation of Atom.
atom
The atom containing exactly those characters, even if the characters look like the printed representation of a number.
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
.
instantiation_error
Atom is uninstantiated and Chars is not instantiated enough.
type_error
Atom is not an atom or Chars cannot be unified with a chars.
representation_error
Chars is a list corresponding to an atom that can’t be represented
The check of Chars when Atom is instantiated was added in release 4.3 for alignment with the ISO Prolog standard. Previous releases simply failed in this case instead of reporting an error for malformed Chars.
atom_codes/2
.