c programming style
J. Shapiro
jss at sjuvax.UUCP
Sat Jul 20 14:55:49 AEST 1985
Teddy at GenRad writes:
> stepping through the array of pointers can be done by by incrementing
> a pointer:
>
> while (condition) /* or some other loop construct */
> . . .
>
> argv++;
>
> This will get us to the next pointer, whereas,
>
> argv = argv + 1;
>
> will NOT (unless by the happy happinstance that a pointer is exactly
> the same size as a character!)
My recollection is that the integer is supposed to get converted to
the appropriate size pointer increment in such code. There are rules for
handling this sort of thing. Though I may well be misreading, I think
Teddy has this one wrong.
Jon Shapiro
More information about the Comp.lang.c
mailing list