home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / c / 18504 < prev    next >
Encoding:
Internet Message Format  |  1992-12-16  |  1.8 KB

  1. Path: sparky!uunet!sdrc!thor!scjones
  2. From: scjones@thor.sdrc.com (Larry Jones)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Questions about token merging and trigraphs
  5. Message-ID: <2404@sdrc.COM>
  6. Date: 16 Dec 92 22:47:40 GMT
  7. References: <42098@pprg.eece.unm.edu.pprg.unm.edu> <1TA04E3@cdis-1.compu.com>
  8. Sender: news@sdrc.COM
  9. Lines: 27
  10.  
  11. In article <1TA04E3@cdis-1.compu.com>, tanner@cdis-1.compu.com (Dr. T. Andrews) writes:
  12. > Trigraphs are an unpleasant invention from the successor  to  the
  13. > horse  committee.   You will recall that the horse committee gave
  14. > us the camel.  Well, X3J11 gave us trigraphs.  I believe that the
  15. > intention  was to prove that standards groups do better when they
  16. > stick with endorsing widely-used practice.
  17.  
  18. If you have a better solution to not having some of the C source
  19. characters available in your local character set, I'd like to hear it. 
  20. Remember that it must work for preprocessor commands (since '#' is one
  21. of the questionable characters) and in character and string literals as
  22. well as in more ordinary contexts.  X3J11 recognizes that trigraphs are
  23. a terrible solution to the problem, but they're better than any other
  24. solution we could find.
  25.  
  26. > The change means that certain old programs may have strings, most
  27. > likely error messages, compiled into something unexpected.
  28.  
  29. The specification for trigraphs was carefully crafted to avoid as much
  30. breakage as possible.  The most likely problem is a string containing
  31. the punctuation "??!" which will be interpreted as "|", but this is a
  32. non-standard punctuation ("?!?" and "!?!" are much more common) -- lots
  33. of people grep'ed lots of code and I think found exactly one occurrance.
  34. ----
  35. Larry Jones, SDRC, 2000 Eastman Dr., Milford, OH  45150-2789  513-576-2070
  36. larry.jones@sdrc.com  or  ...uunet!sdrc!larry.jones
  37. I think your train of thought is a runaway. -- Calvin's Mom
  38.