Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: C++ features for C Date: Sun, 13 May 2018 14:10:23 -0700 Organization: None to speak of Lines: 27 Message-ID: References: <11edbfd7-461d-4579-8ac7-a9e84a6b7630@googlegroups.com> <7b110d3e-ddb5-42a0-af99-aa5b0cb30832@googlegroups.com> <13efc313-d10c-4357-9aa7-6fa55b09d948@googlegroups.com> <6jJJC.146191$MD7.27173@fx14.am4> <3zKJC.11239$3a1.5531@fx11.am4> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="de03f435d476b908b3153305d9b0869d"; logging-data="19133"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+FNnjp0Q1Xiv9xKkZWsIEE" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:uAn1lKjZHueHUy5rlbT9E1lIj7k= sha1:uqMRx/YUtjnbP39ZGe0Ba60kAy0= Xref: csiph.com comp.lang.c:130515 David Brown writes: [...] > Going back to your "double x;" example, "&x" does /not/ "yield a double* > pointer". I'm not sure what you're trying to say, but yes, it does. More precisely, evaluating the expression `&x` yields a value of type `double*`. > "&x" is an /expression/ of type "double * const". There is > no pointer. There is no const. &x is of type double*, which is a pointer type. (&x is not an lvalue, so of course its value can't be modified, but "const" isn't used that way). I think the point you're making is that given double x; there is no pointer *object*. Evaluating `&x` does yield a pointer *value*. (Using pointer as a noun rather than as an adjective can lead to a lot of confusion.) -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"