Path: utzoo!utgpu!watserv1!watmath!att!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!emory!mephisto!mcnc!rti!sheol!throopw From: throopw@sheol.UUCP (Wayne Throop) Newsgroups: comp.lang.c Subject: Re: p[1] vs. *(p+1) Summary: "really"? what is this "really"? Message-ID: <0922@sheol.UUCP> Date: 9 Sep 90 20:54:35 GMT References: <1990Aug31.190103.15043@laguna.ccsf.caltech.edu> <0901@sheol.UUCP> <8382@ncar.ucar.edu> <1990Sep3.173250.8113@oswego.Oswego.EDU> Lines: 23 >> throopw@sheol.UUCP >>I think it is misleading to say that "adding one to p 'really' adds >>sizeof(*p) to p". [...] I say it "really" adds 1, and the result [...] >>points at an element [...] offset exactly 1 > From: hunter@Oswego.EDU (Eric Hunter) > It doesn't "really" add 1; it increments the pointer variable to the next > available address. Which, I still claim, is "really" adding one. My argument was against assuming that the integer representation of pointers was to indicate a byte offset. This is not true for some current machines, and is at best a misleading way of thinking about the situation. "The next available address" may well NOT be "sizeof element" architectural units away from the address one starts with. Or it may well be exactly one unit away, for element type of short, or int, or even double. I think it is a bad idea to explain abstract things in terms of a concrete implementation in other than examples. -- Wayne Throop !mcnc!rti!sheol!throopw or sheol!throopw@rti.rti.org