A
Alexander Muylaert
if (MyTempVar = (++Counter++ == 5)) {
I would also like to add that the C piece of code is *not* faster because it
is on 2 lines.
in pascal we would write it this way.
Inc(Counter);
MyTempVar := Ord(Counter = 5);
Inc(Counter);
if True then begin
Inc(MyTempVar);
Counter := Counter + Ord(MyTempVar <> 2);
Dec(Counter);
end;
Inc, Dec and Ord are *not* functions, it is compilermagic.
Compile both and check out the assembler. It is the same
Amazing? And this even works on german and french computers ;-)
Kind regards
Alexander
Counter += ++MyTempVar-- != 2;
}
I would also like to add that the C piece of code is *not* faster because it
is on 2 lines.
in pascal we would write it this way.
Inc(Counter);
MyTempVar := Ord(Counter = 5);
Inc(Counter);
if True then begin
Inc(MyTempVar);
Counter := Counter + Ord(MyTempVar <> 2);
Dec(Counter);
end;
Inc, Dec and Ord are *not* functions, it is compilermagic.
Compile both and check out the assembler. It is the same

Amazing? And this even works on german and french computers ;-)
Kind regards
Alexander