Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!lll-lcc!pyramid!pesnta!wjvax!brett From: brett@wjvax.UUCP (Brett Galloway) Newsgroups: net.lang.c,net.bugs Subject: Re: e1?(void_e2):(void_e3) so, is it legal or what? Message-ID: <745@wjvax.wjvax.UUCP> Date: Thu, 14-Aug-86 12:37:03 EDT Article-I.D.: wjvax.745 Posted: Thu Aug 14 12:37:03 1986 Date-Received: Fri, 15-Aug-86 20:06:37 EDT References: <155@cbnap.UUCP> <499@dg_rtp.UUCP> <518@hadron.UUCP> <243@desint.UUCP> Reply-To: brett@wjvax.UUCP (Brett Galloway) Organization: Watkins-Johnson Co., San Jose, Calif. Lines: 21 Xref: mnetor net.lang.c:5643 net.bugs:320 In article <243@desint.UUCP> geoff@desint.UUCP (Geoff Kuenning) writes: >While all of this discussion is very interesting and is important to >achieving a precise language definition, let us not forget that there >is *no* reason to ever write this particular expression. Anywhere it's >useful, you can just write > > if (e1) > void_e2; > else > void_e3; > You are correct, but this is true of ALL uses of '?:`. In fact, '?:` is VERY useful, especially when you want to embed conditionals in a macro. Using the if() {} else {} form restricts the contexts in which the macro may appear. -- ------------- Brett Galloway {pesnta,twg,ios,qubix,turtlevax,tymix,vecpyr,certes,isi}!wjvax!brett