Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!husc6!rutgers!clyde!ima!haddock!karl From: karl@haddock.UUCP (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: Stop adding types, Let's remove Trigraphs instead!! Message-ID: <545@haddock.UUCP> Date: Thu, 11-Jun-87 18:10:13 EDT Article-I.D.: haddock.545 Posted: Thu Jun 11 18:10:13 1987 Date-Received: Sat, 20-Jun-87 12:49:19 EDT References: <1266@cullvax.UUCP> Reply-To: karl@haddock.ISC.COM.UUCP (Karl Heuer) Organization: Interactive Systems, Boston Lines: 17 In article <1266@cullvax.UUCP> drw@cullvax.UUCP (Dale Worley) writes: >No, you can process [trigraphs with] a preprocessor, but still, any program >that contains "???" and doesn't use it to mean "?" is non-conforming. So >even if you don't use the preprocessor, you can't escape from its shadow. >(Though I don't think trigraphs are really so bad.) A nit here. "???" is not a trigraph for "?"; in particular "???=" represents "?#" rather than "?=". (I.e. it's the character "?" followed by the trigraph "??=".) To prevent an apparent trigraph from being interpreted as such, one must backslash the second question mark. For example, the program that prints The trigraph for \ is ??/ looks like this in ASCII: main() { printf("The trigraph for \\ is ?\?/\n"); } or, in a less complete alphabet, like this: main() ??< printf("The trigraph for ??/??/ is ???/?/??/n"); ??> Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint