Next: mpg-ref-atom_concat, Previous: mpg-ref-atom_chars, Up: mpg-bpr [Contents][Index]
atom_codes/2
ISOatom_codes(+Atom, -Codes)
atom_codes(-Atom, +Codes)
Codes is the codes comprising the printed representation of Atom.
codes
The codes 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 Codes must be instantiated to a proper codes.
Any atom that can be read or written by Prolog can be constructed
or decomposed by atom_codes/2
.
instantiation_error
Atom is uninstantiated and Codes is not instantiated enough
type_error
Atom is not an atom or Codes cannot be unified with a list of integers
representation_error
An element of Codes is an invalid character code, or Codes is a list corresponding to an atom that can’t be represented
The check of Codes 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 Codes.
atom_chars/2
.