Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: Pointer incrementation and assignment
Message-ID: <1989May26.164821.881@utzoo.uucp>
Organization: U of Toronto Zoology
References: <2015@csuna.csun.edu>
Date: Fri, 26 May 89 16:48:21 GMT

"a++", "a += 1", and "a = a + 1" are all precisely synonymous, by definition,
excluding obscure side effects.  When "a" is a pointer, all three increment
it to point to the next object of the type it points to.  This typically
means adding sizeof(*a) to "a", treating it as if it were an integer.  Note
the word "typically" in that sentence -- it doesn't have to work that way.
Note also that there may not *be* a "next object" unless "a" and "a+1" both
point into the same array (or one past its end).
-- 
Van Allen, adj: pertaining to  |     Henry Spencer at U of Toronto Zoology
deadly hazards to spaceflight. | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
