11.3.15 atom_codes/2 [ISO]

Synopsis

atom_codes(+Atom, -Codes)

atom_codes(-Atom, +Codes)

Codes is the codes comprising the printed representation of Atom.

Arguments

Codes
codes

The codes 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 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.

Exceptions

instantiation_error
Atom and Codes are both uninstantiated
type_error
Atom is not an atom or Codes is not a list
domain_error
Codes is not a codes
representation_error
Codes is a list corresponding to an atom that can't be represented

See Also

atom_chars/2.


Send feedback on this subject.