Hexadecimal notation for national literals

The format and rules for the hexadecimal notation format of national literals are listed in this section.

Format 2: Hexadecimal notation for national literals

NX"hexadecimal-digits"
NX'hexadecimal-digits'

The hexadecimal notation format of national literals is not affected by the NSYMBOL compiler option.

NX" or NX'
Opening delimiters. The opening delimiter must be represented in single-byte characters. It must not be split across lines.
" or '
The closing delimiter. The closing delimiter must be represented as a single-byte character.

If a quotation mark is used in the opening delimiter, a quotation mark must be used as the closing delimiter. Similarly, if an apostrophe is used in the opening delimiter, an apostrophe must be used as the closing delimiter.

hexadecimal-digits
Hexadecimal digits in the range '0' to '9', 'a' - f', and 'A' to 'F', inclusive. Each group of four hexadecimal digits represents a single national character and must represent a valid code point in UTF-16. The number of hexadecimal digits must be a multiple of four.
Maximum length
The length of a national literal in hexadecimal notation must be from four to 320 hexadecimal digits, excluding the opening and closing delimiters. The length must be a multiple of four.
Continuation rules
Normal continuation rules apply.

The content of a national literal in hexadecimal notation is stored as national characters. The resulting content has the same meaning as a basic national literal that specifies the same national characters.

A national literal in hexadecimal notation has data class and category national and can be used anywhere that a basic national literal can be used.