Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!ico!ism780c!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: Dumb question: What IS a trigraph? Message-ID: <14342@haddock.ima.isc.com> Date: 18 Aug 89 17:21:38 GMT References: <3566@uwovax.uwo.ca> <10762@smoke.BRL.MIL> <5940008@hpcupt1.HP.COM> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 24 In article <10762@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: >In article <3566@uwovax.uwo.ca> 2014_5001@uwovax.uwo.ca writes: >>What is a trigraph??? > >There's one (the "???"). Lest anyone take that too literally, I'll point out what I'm sure Doug already knows: although all trigraphs begin with "??", not everything beginning with "??" is a trigraph. In particular, "???" is not one of the nine trigraphs, and so it would not be interpreted specially. (Unless the next character is one of ( ) ! = < > / - ' in which case the first `?' is literal and the other two are the first two-thirds of a trigraph.) In article <5940008@hpcupt1.HP.COM> swh@hpcupt1.HP.COM (Steve Harrold) writes: >[It's possible to accidentally create a trigraph in a string literal.] >The compilation will succeed without comment... Hopefully, most complete% implementations of ANSI C will warn about "possibly unintended trigraph", especially if a trigraphable character (i.e., one of the nine characters [ ] | # { } \ ~ ^ ) is encountered in the same source. Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint % There will undoubtedly be many "incomplete" implementations that don't support trigraphs. I reserve judgement on whether this is good or bad.