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

Charles Hannum mycroft at goldman.gnu.ai.mit.edu
Fri May 31 16:19:20 AEST 1991


In article <m0jizgb-0001OzC at dharma.reed.edu> minar at reed.edu writes:

   the Gnu compiler specifically requires you to turn trigraphs ON
   (I think - that might have changed)

Not if you use '-ansi -pedantic' by default.  B-)  (Okay!  So I'm a pedant!)

   and Borland doesn't even have trigraphs in its compiler anymore,
   there's a program called trigraph.com that does the translation
   for you, so just don't execute it!

This is sloppy programming on Borland's part.  (Not surprising!  Borland has
been going steadily downhill for a while now.)

   Oh, I guess its not conforming code, but does anyone really use
   trigraphs? Really, anyone?

Yes.  I, for one, used them rather recently on an IBM 3090, with WATCOM C/370
(which purports to be ANSI-compliant).  The main reason for this is that IBM
3178 and 3179G terminals have no keys for square brackets.  As a C programmer,
I consider this extremely annoying.  B-/



More information about the Comp.std.c mailing list