From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Date: Mon, 18 Sep 2000 10:47:05 +0000 From: "Douglas A. Gwyn" Message-ID: <39C30B5E.617F0721@null.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: <02c301c01db9$8141c3e0$89c584c3@cybercable.fr>, <200009142041.VAA19586@whitecrow.demon.co.uk> Subject: Re: [9fans] no const? Topicbox-Message-UUID: 0828eec8-eac9-11e9-9e20-41e7f4b1d025 Steve Kilbane wrote: > Well, I can't argue beyond this point: I know that 'const' in ANSI C > doesn't mean quite what it should, and avoid using it for that reason > (I particularly dislike not being able to remember whereabouts in the > decl the damn thing should appear). "const" does mean what it should, just as "char" means what it should. The names may be misleading if you have no other clue, but you're not supposed to be guessing about the language. The "const" qualifier goes next to the thing it qualifies. How hard is that rule to remember? const int *p; // pointer to const int int const *p; // pointer to const int int *const p; // const pointer to int