Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!rochester!ken From: ken@cs.rochester.edu (Ken Yap) Newsgroups: comp.lang.pascal Subject: Re: Funny evaluation of functions Message-ID: <1989Aug29.231308.13734@cs.rochester.edu> Date: 29 Aug 89 23:13:08 GMT References: <20715@adm.BRL.MIL> <616@lehi3b15.csee.Lehigh.EDU> <4357@cps3xx.UUCP> <3007@mace.cc.purdue.edu> Reply-To: ken@cs.rochester.edu.UUCP (Ken Yap) Organization: U of Rochester, CS Dept, Rochester, NY Lines: 13 |And I should have made it clearer when I posted my answer several days ago |that I was referring to the standard, which I had in front of me at the time. | |I just assumed that when I said that "if the function 'one' has side |effects, then the result of x*one(x) is implementation-dependent", people |would know that I meant THE STANDARD SAYS that the result is |implementation-dependent. What other basis could I possibly have had for |making the statement? Certainly not by trying the program on different |compilers, which proves nothing. The implementation could be wrong. Yes indeed. The standard is even more explicit than that. The order of evaluation of the operands of a binary operator is undefined and total evaluation is not required in some cases. See J&W, 3rd Ed.