Update the elements of the character conversion table. This table is used while inputting terms or during the preparation of Prolog texts. The predicate must be used as: char_conversion(In_char, Out_char). The character conversion table is a table which relates input characters with output characters, with the table it is possible to translate input. The characters In_char and Out_char should be quoted atoms to ensure correct execution. When In_char and Out_char are the same the effect of char_conversion/2 is to remove any conversion of character In_char.
It is
important that both arguments of this predicate are enclosed by single quote characters.
see also: current_char_conversion/2 current_op/3 op/3 read/1 read/2 read_term/2 read_term/3 write/1 write/2 write_canonical/1 write_canonical/2 write_list/1 write_list/2 write_list_goal/2 write_list_goal/3 write_term/2 write_term/3 writeq/1 writeq/2
| Example | |
| char_conversion('z', 'b'). | after this predicate has exited successfully all occurences of the character 'z' are replaced by 'b' |
| char_conversion('z', 'z'). | translation of 'z' characters is not done after this example has been exited successfully. |
| Exceptions | |
| In_char is a variable | an instantiation_error exception is thrown |
| Out_char is a variable | an instantiation_error exception is thrown |
| In_char is neither a variable nor a character | a representation_error(character) exception is thrown |
| Out_char is neither a variable nor character | a representation_error(character) exception is thrown |