DIGRAPH | NODIGRAPH
Category
Language element control
Pragma equivalent
None.
Purpose
Enables recognition of digraph key combinations or keywords to represent characters not found on some keyboards.
Note: A digraph is a combination
of keys that produces a character that is not available on some keyboards.
Syntax
Defaults
DIGRAPH
Usage
Table 1 shows the digraphs that z/OS® XL C/C++ supports:
Key Combination | Character Produced |
---|---|
<% | { |
%> | } |
<: | [ |
:> | ] |
%: | # |
%%1 | # |
%:%: | ## |
%%%%1 | ## |
Table 2 shows additional keywords that z/OS XL C++ supports:
Keyword | Characters produced |
---|---|
bitand | & |
and | && |
bitor | | |
or | || |
xor | ^ |
compl | ~ |
and_eq | &= |
or_eq | |= |
xor_eq | ^= |
not | ! |
not_eq | != |
IPA effects
The IPA link step issues a diagnostic message if you specify the DIGRAPH option on that step.
Predefined macros
__DIGRAPHS__ is predefined to 1 when the DIGRAPH compiler option is in effect.
Examples
Note: Digraphs are not replaced in string literals, comments,
or character literals. For example:
char * s = "<%%>"; // stays "<%%>"
switch (c) {
case '<%' : ... // stays '<%'
case '%>' : ... // stays '%>'
}
Related information
See z/OS XL C/C++ Language Reference for more information on Digraph characters.
1 The digraphs %% and %%%% are not digraphs in the C
Standard. For compatibility with z/OS XL C++, however, they are supported
by z/OS XL C. Use the %: and %:%: digraphs instead of %% and %%%% whenever
possible.