Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/3/84; site genrad.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!ucbvax!decvax!genrad!john
From: john@genrad.UUCP (John P. Nelson)
Newsgroups: net.lang.c
Subject: Re: c programming style
Message-ID: <945@genrad.UUCP>
Date: Mon, 15-Jul-85 17:05:17 EDT
Article-I.D.: genrad.945
Posted: Mon Jul 15 17:05:17 1985
Date-Received: Wed, 17-Jul-85 20:10:14 EDT
References: <11570@brl-tgr.ARPA> <935@teddy.UUCP>
Reply-To: john@genrad.UUCP (John P. Nelson)
Organization: GenRad, Inc., Bolton, Mass.
Lines: 25

In article <935@teddy.UUCP> rdp@teddy.UUCP (Richard D. Pierce) writes:
>	char **argv;
>
>	  . . . 
>
>	  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!)

Well, I personally like ++argv best, but the argument above is just NOT TRUE!
Referring to K&R page 94:

    int *pa

    . . .

    The definition of "adding 1 to a pointer", and by extension, all pointer
    arithmetic, is that the increment is scaled by the size in storage of the
    object that is pointed to.  Thus in pa+i, i is multiplied by the size of
    the objects that pa points to before being added to pa.