Cameron Kaiser wrote:
[...] That
compiler was obviously
pre-ANSI or something.
K&R C allows . . .
There was enormous variation in C compilers. And there were lots of
programmers that thought that anything that worked for them was therefore
legit. For example, what would you expect from:
(and would you really expect it to behave the same on other compilers?)
N = 1;
A[N++] = N++;
I'd expect that to evaluate to a[1]=2 and n winds up being 3. But I'm weird.
Wow! Having used all the compilers mentioned in this thread, I would
have assumed a[1]=1 since the post incs
*should not* happen until after the ; I'm missing the ambiguity,
although hard rules for post inc were fuzzy back then. (70's-80's)
Jim Davis.