home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / std / c / 2562 < prev    next >
Encoding:
Text File  |  1992-09-02  |  845 b   |  28 lines

  1. Newsgroups: comp.std.c
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!ucla-cs!twinsun!eggert
  3. From: eggert@twinsun.com (Paul Eggert)
  4. Subject: Re: int const * p;
  5. Message-ID: <bjxHFW|8@twinsun.com>
  6. Sender: usenet@twinsun.com
  7. Nntp-Posting-Host: farside
  8. Organization: Twin Sun, Inc
  9. References: <180188INNmtc@fbi-news.Informatik.Uni-Dortmund.DE> <181tsmINN8uh@fbi-news.Informatik.Uni-Dortmund.DE> <15441@ksr.com> <la9uonINNp9m@exodus.Eng.Sun.COM> <15459@ksr.com>
  10. Date: Thu, 3 Sep 1992 04:28:01 GMT
  11. Lines: 15
  12.  
  13. jfw@ksr.com (John F. Woods) writes:
  14.  
  15. >    const int * const a;
  16.  
  17. >is OK.
  18.  
  19. Yes, but it's terribly confusing.
  20. For consistency, you should always put `const'
  21. _after_ the type that it modifies.  Just like `*'.
  22. So the declaration should be:
  23.  
  24.     int const * const a;
  25.  
  26. It's too bad that common usage has this backwards.
  27. Even the standard's examples are backwards.
  28.