Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!nbires!hao!hplabs!pyramid!decwrl!sun!saber!qubix!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: <754@wjvax.wjvax.UUCP> Date: Tue, 2-Sep-86 13:11:05 EDT Article-I.D.: wjvax.754 Posted: Tue Sep 2 13:11:05 1986 Date-Received: Thu, 4-Sep-86 04:16:45 EDT References: <518@hadron.UUCP> <243@desint.UUCP> <745@wjvax.wjvax.UUCP> <248@desint.UUCP> <114@methods.UUCP> Reply-To: brett@wjvax.UUCP (Brett Galloway) Organization: Watkins-Johnson Co., San Jose, Calif. Lines: 16 Xref: mnetor net.lang.c:5778 net.bugs:336 In article <114@methods.UUCP> cary@methods.UUCP (Cary Timar (U of W co-op)) writes: >In article <248@desint.UUCP> geoff@desint.UUCP (Geoff Kuenning) writes: >> >>Unfortunately, Brett is incorrect here. You can't use if/then/else to write: >> >> for (i = up ? 0 : 99; up ? (i < 100) : (i >= 0); up ? i++ : i--) >> { >> /* complex loop body */ >> } I don't know what I originally said. What I MEANT to say was that the '?:` operator is useful. There are cases (such as within macros) where if/then/else is not appropriate. That's all. -- ------------- Brett Galloway {pesnta,twg,ios,qubix,turtlevax,tymix,vecpyr,certes,isi}!wjvax!brett