Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site pur-phy.UUCP Path: utzoo!linus!decvax!harpo!ihnp4!inuxc!pur-ee!CS-Mordred!Pucc-H:Physics:crl From: crl@pur-phy.UUCP (Charles LaBrec) Newsgroups: net.lang.c Subject: Re: i = i * f *vs* i *= f (Not a bug) Message-ID: <1298@pur-phy.UUCP> Date: Tue, 17-Apr-84 03:32:32 EST Article-I.D.: pur-phy.1298 Posted: Tue Apr 17 03:32:32 1984 Date-Received: Wed, 18-Apr-84 01:15:59 EST References: <2310@ecsvax.UUCP> Organization: Purdue University Physics Dept. Lines: 13 However, pulling out the trusty K&R says (pg 191, Sec 7.14) The behavior of an expression of the form E1 op= E2 may be inferred by taking it as equivalent to E1 = E1 op (E2) .... So i *= .2 should be evaluated as i = i * .2, which is a very legal mixed mode operation where i gets converted to a double, multiplied by .2, truncated to an integer, and assigned to i. Charles LaBrec UUCP: pur-ee!Physics:crl, purdue!Physics:crl INTERNET: crl @ pur-phy.UUCP