Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!decvax!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: Another silly question Message-ID: <13268@haddock.ima.isc.com> Date: 22 May 89 18:40:41 GMT References: <17812@cup.portal.com> <607@kl-cs.UUCP> <749@mccc.UUCP> <17635@mimsy.UUCP> <756@mccc.UUCP> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 14 In article <756@mccc.UUCP> pjh@mccc.UUCP (Pete Holsberg) writes: >In article <17635@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: >>I have never observed [a compiler to treat "a[i]" and "*(a+i)" differently]. > >Perhaps I've asked the wrong question. I saw a couple of simple test >programs that assigned 0 to each member of an array. One used array >subscript notation, and the other, pointer notation. By "pointer notation" do you mean only that the code used "*(a+i)" for "a[i]"? Or are you talking about code that used "*p++" instead of "a[i++]"? The latter is an entirely different question! (And it's usually what people are testing when they write "array vs. pointer" tests.) Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint