HP aC++/HP C A.06.20 Programmer's Guide
Trigraph Sequences
The C++ source code character set is a superset of the ISO 646-1983 Invariant Code Set.
To enable you to use only the reduced set, you can use trigraph sequences to represent
those characters not in the reduced set.
A trigraph sequence is a set of three characters that is replaced by a corresponding
single character. The preprocessor replaces all trigraph sequences with the corresponding
character. The list below gives the complete list of trigraph sequences and their
replacement characters. The following are all the trigraph sequences and their respective
replacement characters:
• ??= is replaced by #
• ??/ is replaced by \
• ??’ is replaced by ^
• ??( is replaced by [
• ??) is replaced by ]
• ??! is replaced by |
• ??< is replaced by {
• ??> is replaced by }
• ??- is replaced by ~
Examples
The line below contains the trigraph sequence ??=:
??=line 5 "myfile"
When this line is compiled it becomes:
#line 5 "myfile”
168 Preprocessing Directives