11.3.36 char_conversion/2   ISO

Synopsis

char_conversion(+InChar, +OutChar)

The mapping of InChar to OutChar is added to the character-conversion mapping.

Arguments

InChar

char, must be nonvar

OutChar

char, must be nonvar

Description

The mapping of InChar to OutChar is added to the character-conversion mapping. This means that in all subsequent term and program input operations any unquoted occurrence of InChar will be replaced by OutChar. The rationale for providing this facility is that in some extended character sets (such as Japanese JIS character sets) the same character can appear several times and thus have several codes, which the users normally expect to be equivalent. It is advisable to always quote the arguments of char_conversion/2.

Any previous mapping of InChar is replaced by the new one.

Please note: the mapping is global, as opposed to being local to the current module, Prolog text, or otherwise.

Exceptions

instantiation_error

An argument is uninstantiated

type_error

An argument is not a char

See Also

Glossary.


Send feedback on this subject.