Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
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
» Feedback
Content starts here

 » 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
??=#
??/\
??'^
??([
??)]
??!|
??<{
??>}
??-~

 

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.