How to write Trigraph like character sequences in a string (was:Re: to "OR" or not to "OR")

Doug Gwyn gwyn at smoke.brl.mil
Sat Jun 1 04:43:03 AEST 1991


In article <m0jizgb-0001OzC at dharma.reed.edu> minar at reed.edu writes:
>>>> What if I want to use the sequence "??!" within a string?
>easy. Use a compiler that is fully ANSI, but lets you turn off
>trigraphs.

Excuse me -- if a compiler variant does not support trigraphs then
it should not be called "ANSI" (as in "conforming to the ANSI C standard").
Standard conformance is a well-defined and useful property; let's not
introduce confusion about what the phrase "ANSI C" means by applying
it to deviant implementations.

That being said, I also have to take issue with the idea of relying
on a compiler "switch" for correct program semantics.  There are
standard ways to meet the requirement; no need to resort to such kludgery.



More information about the Comp.std.c mailing list