Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uwm.edu!csd4.csd.uwm.edu!markh From: markh@csd4.csd.uwm.edu (Mark William Hopkins) Newsgroups: comp.lang.c Subject: Re: When do you use "if ( a = b )"? (was Re: Funny mistake) Message-ID: <10668@uwm.edu> Date: 1 Apr 91 16:19:46 GMT References: <13980@helios.TAMU.EDU> <13982@helios.TAMU.EDU> <13983@helios.TAMU.EDU> Sender: news@uwm.edu Organization: University of Wisconsin - Milwaukee Lines: 19 In article <13983@helios.TAMU.EDU> byron@archone.tamu.edu (Byron Rakitzis) writes: >Last try: (though this one doesn't look as horrible as the one above) > > if ((A = f1()) - 2 || (A = f2()) - 3 || (A = f3()) - 4) THere you go! I knew if I looked far enough down the article list, I'd see a correction. :) My return example should not read: > (Op = FindOp(S)) && return Op->Type || > (Sym = NewSym(S)) & return Sym->Index; but > return (Op = FindOp(S))? Op->Type: (Sym = NewSym(S)), Sym->Index; I keep on forgetting that in their infinite wisdom the Standard Bearers forgot to make return X a void expression. I'll be sure to add that feature in my next compiler...