Path: utzoo!attcan!uunet!mcsun!unido!pcsbst!cochise!roland From: roland@cochise.pcs.com (Roland Rambau) Newsgroups: comp.lang.c Subject: Re: gcc/cc difference Message-ID: <640@pcsbst.pcs.com> Date: 28 Jun 90 11:18:09 GMT References: <1802@tkou02.enet.dec.com> <622@atcmpe.atcmp.nl> <1805@tkou02.enet.dec.com> <6971@star.cs.vu.nl> Sender: news@pcsbst.pcs.com Distribution: comp Lines: 29 maart@cs.vu.nl (Maarten Litmaath) writes: ->)>>> mflag ? *buf++ -=mean.median : Mflag ? *buf++ ->)>>> -=mean.mode : *buf++ -=mean.mean; ->The expression is of this form: -> a ? b : c = d; ->The illegal lvalue is: -> a ? b : c ->(sic)! The `?:' operator has a higher priority than the various assignment ->operators. The following does what was intended: -> a ? b : (c = d); What really was intended is *buf -= mfag ? mean.median : Mfalg ? mean.mode : mean.mean ; buf += 3 ; ( Or did I get this wrong, and the original does NOT increment tree times ? ) Roland Rambau rra@cochise.pcs.com, {unido|pyramid}!pcsbst!rra, 2:507/414.2.fidonet