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


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

See Also

atom_codes/2.


Send feedback on this subject.