Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 5/3/83 based; site hou2g.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!houxm!hou2g!mnc
From: mnc@hou2g.UUCP (#M.CONDICT)
Newsgroups: net.lang.c
Subject: Re: Orphaned Response - (nf)
Message-ID: <198@hou2g.UUCP>
Date: Mon, 19-Mar-84 10:08:45 EST
Article-I.D.: hou2g.198
Posted: Mon Mar 19 10:08:45 1984
Date-Received: Tue, 20-Mar-84 00:47:08 EST
References: <93@haddock.UUCP>
Organization: AT&T Bell Labs, Holmdel NJ
Lines: 21

> In regard to this:
> 
> 	cat = foo ? fu = bar : mouse;
> 
> Precedence has nothing to do with it.  Precedence only matters when there
> are two possible legal parses, such as "a + b * c" which could be either
> "(a + b) * c" or "a + (b * c)" without precedence to disambiguate.
> 
> The only possible parse for the first expression is:
> 
> 	cat = foo ? (fu = bar) : mouse;
> 
> so that the "fu = bar" assignment happens before the assignment to cat
> if it happens at all.  Golly.

What's wrong with the parse:  (cat = foo) ? (fu = bar) : mouse;  ?
This evaluates an if-then-else expression containing two assignments as
side effects and then throws away the result.

Michael Condict    ...!hou2g!mnc