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

  1. Path: sparky!uunet!spool.mu.edu!umn.edu!lynx!pprg.unm.edu!ele
  2. From: ele@chama.eece.unm.edu
  3. Newsgroups: comp.lang.c
  4. Subject: Questions about token merging and trigraphs
  5. Message-ID: <42098@pprg.eece.unm.edu.pprg.unm.edu>
  6. Date: 11 Dec 92 16:35:41 GMT
  7. Sender: news@pprg.unm.edu
  8. Distribution: world
  9. Lines: 27
  10. Oranization: University of New Mexico
  11.  
  12.  
  13. Two questions about ANSI C:
  14.  
  15. (1) How is the preprocessor token merging mechanism (##) supposed to
  16. be used?  I know, for example that if you have
  17.  
  18. #define X(i)  x ## i
  19.  
  20. then the preprocessor will replace code like 'X(1)' with 'x1', but
  21. could someone give me an example of where this (or some other use of
  22. '##') would be useful?
  23.  
  24. (2) There is a command-line switch to disable the 'trigraph' feature
  25. in the gcc compiler.  What are trigraphs?  From the comments in the
  26. gcc documentation I gather that they are something that the ANSI
  27. committee has added to C and that Richard Stallman doesn't care for
  28. them.  If that is the case, I'm wondering what purpose the ANSI
  29. committee saw for them, why anyone would object to them, and, most
  30. importantly, what they are.
  31.  
  32. Thanks for any help offered!
  33.  
  34. --
  35.   Erik L. Ellis                 |
  36.   NASA Langley Research Center  |  Office:  804/864-5819
  37.   Information Systems Division  |    Home:  804/827-1259 (leave msg.)
  38.   Mail Stop 152D                |     FAX:  804/864-8672
  39.