display

display(): String;

If the receiver is a printable character, the display method of the Character primitive type returns a string containing the receiving character if it is a printable character for the current language setting.

If the receiver is not a printable character, the display method returns a string containing the hexadecimal value of the receiving character, enclosed in single quotation marks ('') and preceded by a number sign (#).

The following example shows the use of the display method.

vars
    char1, char2, char3 : Character;
begin
    char1 := "q";
    char2 := #'13';
    char3 := #'41';
    write char1.display;     // Outputs q
    write char2.display;     // Outputs #'13'
    write char3.display;     // Outputs A
end;