.TH "trigraph" "" "" "C Language"
.PC
.PP
.II "ISO 646"
.II ??=
.II ??(
.II ??/	
.II ??)
.II ??'
.II ??<
.II ??!
.II ??>
.II ??-
A
.I "trigraph"
is a set of three characters that represents one character in the
C character set.
The set of trigraph sequences was defined in the ANSI Standard
to allow users to use the full range of C characters, even if their keyboards
do not implement the full C character set.
Trigraph sequences are also useful with input devices
that reserve one or more members of the C character set for internal use;
e.g., the Hazeltine family of terminals, which reserves the tilde `~'
as its escape character.
.PP
Each trigraph sequence is introduced by two question marks.
The third character in the sequence indicates which character is being
represented.
The following table gives the set of trigraph sequences:
.DM
.ta 1.0iC 2.0iC
	\fITrigraph	Character\fP
	\fISequence	Represented\fP
.sp \n(pDu
	??=	#
	??(	[
	??/	\e
	??)	]
	??'	^
	??<	{
	??!	|
	??>	}
	??-	~
.DE
.PP
The characters represented are the ones used in the
C character set but not included in the ISO 646 character set.
ISO 646 describes an invariant sub-set of the ASCII character set.
.PP
Trigraph sequences are interpreted even if they occur within a string
literal or a character constant.
Thus, strings that uses a literal \*(QL??\*(QR will not work the
same as under a non-ANSI implementation of C.
For example, the function call
.DM
	printf("Feel lucky, punk??!\en");
.DE
.PP
would print:
.DM
	Feel lucky, punk|
.DE
.PP
To print a pair of questions marks, use the escape sequence \*(Ql\e??\*(Qr.
For example:
.DM
	printf("Feel lucky, punk\e??!\en");
.DE
.SH "See Also"
.Xr "cc," cc
.Xr "C language" c_languag
.br
\*(AS, \(sc5.2.1.1
.SH Notes
By default, the \*(CO C compiler
.B cc
ignores trigraphs.
To invoke interpretation of trigraphs, use the option \fB\-V3GRAPH\fR.
