Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: net.lang.c Subject: Re: C question Message-ID: <5434@utzoo.UUCP> Date: Sat, 6-Apr-85 19:49:40 EST Article-I.D.: utzoo.5434 Posted: Sat Apr 6 19:49:40 1985 Date-Received: Sat, 6-Apr-85 19:49:40 EST References: <5272@tektronix.UUCP> Organization: U of Toronto Zoology Lines: 13 Note that section 7 of K&R Appendix A says explicitly that the order of side effects within an expression is undefined and is up to the compiler. The ANSI C-standard drafts contain similar although more elaborate wording. The value of x after: x = 5; x = x++; is not 5 or 6, it is "5 or 6". It is most unwise to write code that relies on one particular choice. -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry