home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / cplus / 17986 < prev    next >
Encoding:
Text File  |  1992-12-15  |  1.4 KB  |  37 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!haven.umd.edu!wam.umd.edu!krc
  3. From: krc@wam.umd.edu (Kevin R. Coombes)
  4. Subject: Re: Survey: File Extension
  5. Message-ID: <1992Dec15.145208.27600@wam.umd.edu>
  6. Sender: usenet@wam.umd.edu (USENET News system)
  7. Nntp-Posting-Host: rac1.wam.umd.edu
  8. Organization: University of Maryland, College Park
  9. References: <Bz80Bu.HI4@knot.ccs.queensu.ca> <WARSAW.92Dec14101955@anthem.nlm.nih.gov> <1992Dec14.211010.10318@rd.hydro.on.ca>
  10. Date: Tue, 15 Dec 1992 14:52:08 GMT
  11. Lines: 24
  12.  
  13. In article <1992Dec14.211010.10318@rd.hydro.on.ca> twriter@rd.hydro.on.ca writes:
  14. >warsaw@nlm.nih.gov (Barry A. Warsaw) writes:
  15. >
  16. >
  17. >>Should the .h file extension matter?  Do compilers supporting
  18. >>pre-compiled headers need to know the extension for header files?
  19. >>Just wondering 'cause we use .cc and .hh
  20. >
  21. >Is there a good reason for having separate extensions for C and C++
  22. >header files?  Why not share header files between C and C++ like so:
  23. > [example omitted]
  24. >
  25. >One situation where I have found it useful to have separate extensions
  26. >is for editors which choose a mode based on the extension.  However, I
  27. >get around this with GNU emacs using file local variables e.g.
  28. >
  29.  
  30. Emacs will default according to the extension, but this can be overridden
  31. by the first line of the file. For example, the headers for libg++ all
  32. start with:
  33.  
  34. // This may look like C code, but it is really -*- C++ -*-
  35.  
  36. Kevin Coombes <krc@math.umd.edu>
  37.