Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Difference between these pointer syntaxes Date: Wed, 17 Aug 2016 19:03:38 -0700 Organization: None to speak of Lines: 39 Message-ID: References: <87r39s8w6c.fsf@bsb.me.uk> <4991b886-1f54-4098-bf57-ba59710b99d1@googlegroups.com> <87bn0rut34.fsf@bsb.me.uk> <9283b112-8250-4e0b-b149-6ca728a3200b@googlegroups.com> <07faa95e-2470-4375-93e9-15e79ee4e0e4@googlegroups.com> <3b468188-f048-48de-9aaa-eaadd06133d0@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="25327"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18c43QDrqHUbu0N9tA2+GtP" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:8pBZdUcB01B18IiQhJiV6NpRLSU= sha1:LLi2wzmugAU2LBJlcMrx8jz+74o= Xref: csiph.com comp.lang.c:92437 Malcolm McLean writes: > On Thursday, August 18, 2016 at 12:32:13 AM UTC+1, Keith Thompson wrote: >> BartC writes: >> > On 17/08/2016 23:37, Malcolm McLean wrote: [...] >> >> To get an array you need to obtain a buffer, then put data into it. >> >> The data is then your array, it's an array of data, not of memory >> >> elements. Just as an array of soldiers is the men, not the >> >> spaces on the parade ground they occupy. >> >> >> >> The C standard misuses the term array to include buffers, which is >> >> one source of confusion. Then it is a little glitch that a pointer >> >> to a datum and a pointer to a buffer are not distinguished, but of >> >> course normally they will resolve to the same machine operations. >> >> It works reasonably well. >> > >> > But I'm starting to discover it doesn't actually work that well at all. >> >> Bart, I suggest you ignore Malcolm's comments on this matter. >> He's invented some ludicrous distinction between "arrays" and >> "buffers", where what he calls "arrays" are *not* C arrays. >> > The term "buffer" and the term "array" are not my invention. [...] Ok, but whether you personally invented the terms is not the issue. You are deliberately using the word "array" with a meaning that is inconsistent with the way the C standard uses the word, and you are doing it in a thread discussing the semantics of C arrays. You are just making matters even more confusing than they already are. Whatever it is you mean by "array", please find another term for it. -- 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"