Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/17/84; site bdaemon.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!hao!nbires!bdaemon!carl From: carl@bdaemon.UUCP (carl) Newsgroups: net.lang.c Subject: Re: C question Message-ID: <288@bdaemon.UUCP> Date: Tue, 9-Apr-85 10:27:17 EST Article-I.D.: bdaemon.288 Posted: Tue Apr 9 10:27:17 1985 Date-Received: Fri, 12-Apr-85 05:26:19 EST References: <5272@tektronix.UUCP> <230@aluxp.UUCP> Organization: Daemon Assoc., Boulder, CO Lines: 22 Please, let us stop this discussion of side effects right NOW. It has been beaten to death before and is pointless. Instead, read page 50 of K&R, where the following sentences can be found: "In any expression involving side effects, there can be subtle dependencies on the order in which variables taking part in the expression are stored. One unhappy situation is typified by the statement a[i] = i++; The question is whether the subscript is the old value of i or the new. The compiler can do this in different ways, and generate different answers depending on its interpretation. When side effects (assignment to actual variables) takes place is left to the discretion of the compiler, since the best order strongly depends on machine architecture. The moral of this discussion is that writing code which depends on order of evaluation is a bad programming practice in any language." Carl Brandauer daemon associates, Inc. 1760 Sunset Boulevard Boulder, CO 80302