11.3.34 char_code/2 [ISO]

Synopsis

char_code(+Char, -Code)

char_code(-Char, +Code)

Code is the character code comprising the printed representation of Char.

Arguments

Char
char

The char whose code is Code.

Code
code

The code corresponding to Char.

Description

Initially, at least one argument must be instantiated.

Exceptions

instantiation_error
Char and Code are both uninstantiated
type_error
Char is not a char or Code is not an integer.
representation_error
Code is not a code.

See Also

atom_codes/2, number_codes/2.


Send feedback on this subject.