HPlogo HP C++ Programmer's Guide: HP 9000 Series Workstations and Servers > Chapter 2 The HP C++ Preprocessor

Trigraph Sequences

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

Description

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. Table 2-2 “Trigraph Sequences and Replacement Characters” gives the complete list of trigraph sequences and their replacement characters.

Example

The line below contains the trigraph sequence ??=:

     ??=line 5 "myfile"

When this line is compiled it becomes:

     #line 5 "myfile"

Table 2-2 Trigraph Sequences and Replacement Characters

Trigraph SequenceReplacement
??=#
??/\
??'^
??([
??)]
??!|
??<{
??>}
??-~

 

© Hewlett-Packard Development Company, L.P.