Another silly question

Karl Heuer karl at haddock.ima.isc.com
Tue May 23 04:40:41 AEST 1989


In article <756 at mccc.UUCP> pjh at mccc.UUCP (Pete Holsberg) writes:
>In article <17635 at mimsy.UUCP> chris at 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 at haddock.isc.com), The Walking Lint



More information about the Comp.lang.c mailing list