G
GWTNewbie
Pleasantries:
It's been a while since I last participated in the newsgroup (over 2 decades under a different handle). A lot has changed, so if I'm out of line in any of my postings, please "prod" me in the right direction.
Question:
I need help interpreting K&R's (2nd Edition) explanation of argv. Specifically, the book puts two constructs into a single program: ++argv[0] and (++argv)[0]. The program itself is supposed to "intelligently" implement program switches. Here's an example:
progname -o -r -s filename.out
progname -o -rs filename.out
progname -sor filename.out
All 3 of these command implementations should produce the same result.
Can someone here provide me a "very detailed" explanation - a diagramatic illustration if possible - of the difference between ++argv[0] and (++argv)[0] and it's used to implement handling program switches to result it the above description?
It's been a while since I last participated in the newsgroup (over 2 decades under a different handle). A lot has changed, so if I'm out of line in any of my postings, please "prod" me in the right direction.
Question:
I need help interpreting K&R's (2nd Edition) explanation of argv. Specifically, the book puts two constructs into a single program: ++argv[0] and (++argv)[0]. The program itself is supposed to "intelligently" implement program switches. Here's an example:
progname -o -r -s filename.out
progname -o -rs filename.out
progname -sor filename.out
All 3 of these command implementations should produce the same result.
Can someone here provide me a "very detailed" explanation - a diagramatic illustration if possible - of the difference between ++argv[0] and (++argv)[0] and it's used to implement handling program switches to result it the above description?