On Oct 18, 2004, at 2:46 AM, Wouter van Ooijen wrote: > You can't rely on the order of evalution, and you can't rely on either > (foo == 3) or (3 == foo) to generate code that is better than the other > construct. If you need to dive this deep you are essentially > programming > specifically for the compiler at hand, and you might be better of > either > using a better compiler, or using assmebler. Yes, exactly. We have a rule here that before one goes out of their way to "optimize" their code at the C source level (use of "inline", funny code ordering, etc), they have to look at the actual object code being produced and check that it's actually faster... And Peter L. Peres wrote elsewhen: > >> It's just not ENGLISH. Mathematicians will consider >> an equality statement fully reversable; "foo = 3" is precisely >> identical to "3 = foo"; one of the foundations of algebra, sort of. > > Does this have anything to do with mathematicians ranting about C being > 'wrong' and the 'right' way being the Pascal syntax of foo := 3 ? Yep. Although the "rant" I heard was usually about BASIC, which goes C one worse and uses "=" for both assignment AND equality testing. And they really hated the original "let A = A+1", since it has a resemblance to mathematical language... BillW _______________________________________________ http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist