Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!haven.umd.edu!ni.umd.edu!uc780.umd.edu!cs450a03 From: cs450a03@uc780.umd.edu Newsgroups: comp.sys.amiga.programmer Subject: RE: Compiler code (was a flame fest) (now a lesser fl Message-ID: <22APR91.20055594@uc780.umd.edu> Date: 22 Apr 91 20:05:55 GMT References: <1991Apr17.180342.25312@engin.umich.edu> <91112.093750GHGAQZ4@cc1.kuleuven.ac.be> Sender: usenet@ni.umd.edu (USENET News System) Organization: The University of Maryland University College Lines: 33 (sorry about the mangled subject line. My newsreader does that for you automatically.) Jorrit Tyberghein > Someone Else >> >> Nope. ++ and -- are unary operators of the highest precedence. >>The only difference between ++x and x++ is the value they assume, >>the order of evaluation follows standard C precedence.. >I think you are wrong. Look at the following results : >I have tried this with our mainframe compiler : [examples like (n--)*(n++) deleted] If you have C change something twice, without specifying what order to change them in, then C will usually pick the order arbitrarily. This means, for instance, that int n=4; printf("%d\n", (n--)*(n++)); could print 12, 16, or 20, depending on the compiler. Also, it is possible that the idiom (n--)*(n++) will evaluate in a different order at different places in the _same_ program, especially if the program is compiled with optimization turned on. Raul Rockwell (I'd have thought more people would have pounced on this thread earlier....)