c programming style
Guy Harris
guy at sun.uucp
Tue Jul 16 17:20:08 AEST 1985
> 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!)
Excuse me, but what alternate universe did you get your C Reference manual
from? Both of the two above statements have the *exact same effect* in C;
they cause "argv" to point to the pointer that follows the one it pointed to
before the statement.
The C Reference Manual:
7.2 Unary operators
...The expression ++x is equivalent to x += 1.
Guy Harris
More information about the Comp.lang.c
mailing list