5.2.1.1 Trigraph sequences

Previous Table of Contents "New C Standard" commentary

232 All occurrences in a source file Before any other processing takes place, each occurrence of one of the following sequences of three characters (called trigraph sequences12)) are replaced with the corresponding single character.

233

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

234 No other trigraph sequences exist.

235 Each ? that does not begin one of the trigraphs listed above is not changed.

236 EXAMPLE 1


       ??=define arraycheck(a,b) a??(b??) ??!??! b??(a??)

becomes


       #define arraycheck(a,b) a[b] || b[a]

237 EXAMPLE 2 The following source line


        printf("Eh???/n");

becomes (after replacement of the trigraph sequence ??/)


        printf("Eh?\n");

Next

Created at: 2008-01-30 02:39:39 The text from WG14/N1256 is copyright © ISO