Path: utzoo!attcan!uunet!cs.utexas.edu!sun-barr!rutgers!apple!oliveb!sun!rushforth!kcr From: kcr%rushforth@Sun.COM (Kevin Rushforth) Newsgroups: comp.sources.games.bugs Subject: Re: Galactic Bloodshed compiler error Message-ID: <104342@sun.Eng.Sun.COM> Date: 11 May 89 17:20:32 GMT References: <17958@cisunx.UUCP> <2889@cps3xx.UUCP> <808@jura.tcom.stc.co.uk> Sender: news@sun.Eng.Sun.COM Reply-To: kcr@sun.UUCP (Kevin Rushforth) Organization: Sun Microsystems, Mountain View Lines: 32 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. -- Kevin C. Rushforth | "If winning is not important, Sun Microsystems | then commander, why keep score?" | - Lt. Worf ARPA: kcr@sun.com | UUCP: !sun!kcr |