Next: , Previous: , Up: mpg-bpr   [Contents][Index]


11.3.17 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 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.

See Also

atom_chars/2.


Send feedback on this subject.