Character
Types
The character extension adds one new base type:
"char"
Characters are a singular Unicode character.
Operations
Comparison operators, which take two char
values and produce a bool
:
ceq
clt
cle
cgt
cge
Conversion operators:
char2int
: One argument: a variable of typechar
. Returns an integer representing the Unicode code point of the given value.int2char
: One argument: a variable of typeint
. Returns the corresponding Unicode character. Throws if the value does not correspond to a valid Unicode code point.
Printing
The core print
operation prints char
values.