Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.glorb.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 23 Nov 2011 08:30:02 -0600 Message-ID: <4ECD036B.C92@mindspring.com> Date: Wed, 23 Nov 2011 09:30:03 -0500 From: pete Reply-To: pfiland@mindspring.com Organization: PF X-Mailer: Mozilla 3.04Gold (WinNT; I) MIME-Version: 1.0 Newsgroups: comp.lang.c Subject: Re: Size of an arraylist in bytes References: <4ec97cb2$0$289$14726298@news.sunsite.dk> <88mdneGuVukoHlTTnZ2dnUVZ_jGdnZ2d@earthlink.com> <4ECAD480.5FD5@mindspring.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 51 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 4.154.223.21 X-Trace: sv3-UuF/OlqzcX2WWfeQIgXRcz//R4w1761L6nl3xlO0vzFbJBbAZrqBbyeZ2cIteldlyo3gezwaZIKktiL!rlUImNt5V3pcNlDeL0X4D/XTh+j5HYvzwDE1AUigfPbhG4lWBzqOBegsGP/Xjl8/XS1YgAFG6Rtq!QKMmsOfU X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 3313 Xref: x330-a1.tempe.blueboxinc.net comp.lang.c:13818 Ark wrote: > > On 11/21/2011 5:45 PM, pete wrote: > > Keith Thompson wrote: > >> > >> Joe Wright writes: > >> [...] > >>> A pointer is a variable object in storage which can hold the address of > >>> another object in storage. The address is a value, the pointer is an object. > >>> > >>> This concept is too complicated (or too simple) to some of my old friends > >>> but it works for me. Keith Thompson beat me into semi-submission several > >>> years ago until I got too tired to play. But here I am again. > >>> > >>> A pointer is an object. A function cannot return an object. Consider.. > >>> > >>> char *strcat(char *d, char *s); > >>> > >>> ..does not return a pointer, but an address of (char*) type. > >> > >> That's an entirely consistent and sensible way to look at it. > >> > >> Unfortunately, > >> it's entirely inconsistent with the way standard uses the > >> word "pointer". See for example, C99 7.20.3.3p3: > >> > >> The malloc function returns either a null pointer or a pointer to > >> the allocated space. > > > > A null pointer constant, may be converted to null pointer. > > > > I refer to any expression of any type, > > as an instance of that type. > > > > (0.0) is a double. > > > I wonder if an expression > (i.e. a critter with a type and a value) is in > some sense "an instance". Is there any point in distinguishing an > instance and an object? If so, what is it? It depends on context: if you're talking about the pointer argument in a call to strlen, then it doesn't make any difference whether or not the pointer is also an a lvalue. If you're talking about assigning a value to a pointer, then it does make a difference. -- pete