Mirror of the Rel4tion website/wiki source, view at <http://rel4tion.org>
Clone
HTTPS:
git clone https://vervis.peers.community/repos/yEzqv
SSH:
git clone USERNAME@vervis.peers.community:yEzqv
Branches
Tags
09-num-escape.mdwn
[[!meta title=“2.9 | Numeric Character Escape Sequences”]]
Numeric Character Escape Sequences
The numeric sequences allow specifying a character value by its Unicode character number (code point). They’re supported by single-quoted character literals and inside string literals.
\nnnnn
- decimal number, prefixed by\
. For example,'\97
is the same as'a'
.\onnnnn
- octal number, prefixed by\o
(the letter o, not the number 0). Digits allowed are 0-7. For example, ‘141’is the same as
‘a’`.\xnnnnn
- hexadecimal number, prefixed with\x
. Digits allowed are 0-9, a-f (and their uppercase counterparts A-F). For example,'\x61'
is the same as'a'
.
The maximal value of a numeric sequence is \1114111
, which is the same as \o4177777
and \x10ffff
. This is exactly enough to represent all Unicode values.