Path: utzoo!attcan!uunet!pdn!boake2!jc3b21!crash From: crash@jc3b21.UUCP (Frank J. Edwards) Newsgroups: comp.sources.games.bugs Subject: Re: Galactic Bloodshed compiler error Message-ID: <667@jc3b21.UUCP> Date: 12 May 89 16:54:05 GMT References: <104342@sun.Eng.Sun.COM> Followup-To: comp.lang.c Organization: St. Petersburg Jr. College, FL Lines: 38 From article <104342@sun.Eng.Sun.COM>, by kcr%rushforth@Sun.COM (Kevin Rushforth): : In article <808@jura.tcom.stc.co.uk> pjb@htc2.UUCP (Peter J. Bishop) writes: :>the only solution that I could come up with to solve it was to change the :>lines of the form: :> :> p->popn *= .80; :> :>and change them to read: :> :> p->popn = p->popn * .80; :> :>Hope this solves your problem. :>BTW Does anyone know why this solves the problem? Or have I made a mistake in :>the modification? : : If this does indeed solve the problem, then your compiler is broken. : : If "a" is an lvalue and "b" is an expression, then: : : a *= b; : : is identical to: : : a = a * (b); : : except for the fact that "a" is evaluated (e.g. for side effects) only once. Actually, I used a compiler once in which the "broken" code was the expression parser, i.e. "a *= .80" didn't work but "a *= (.80)" or "a *= 0.80" did!! Some sort of problem with the floating point number starting with a period immediately after an assignment token, et al. Followups to comp.lang.c :-) Frank "Crash" Edwards ...!uunet!pdn!jc3b21!crash