>> >
N = 1;
>> > A[N++] = N++;
>>On the other hand, I'd fire anyone who wrote something like the above.
On Sat, 2 Jun 2007, dwight elvey wrote:
Hi
I have no idea what would actually be done but I'd expect A[2]=1.
N would be 3.
If this was what was intended, why would you fire them?
Because it is treacherous code. If that WAS what was intended, it will
work. When you switch compilers, it will stop working, and waste a lot
of time of a lot of people finding and isolating what went wrong.
Meanwhile, the original author will be insisting that there is a bug in
the new compiler.
Dave did a thorough job of explaining that for various implementation
related reasons, there are multiple VALID results from that code.
And I came up with a completely different interpretation than Dwight, so ...
--
------------------------------------ personal:
-- Immigration is the sincerest form of flattery. -- Jack Paar ----------------