X (hex) character constant

The X character constant is a contiguous sequence of an even number of hex digits enclosed in single or double quotation marks and followed immediately by the letter X. Each pair of hex digits represents one character.

The length of an X constant is half the number of hex digits specified.

A null X constant is written as two quotation marks followed by the X suffix.

Syntax

Read syntax diagramSkip visual syntax diagram'hex-digit hex-digit'X
Table 1. Examples of X constants
Constant Length
"0d0A"x 2
''X 0
Note: The use of X constants can limit the portability of a program.