Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!mmm!mkr From: mkr@mmm.UUCP (MKR) Newsgroups: net.lang.c Subject: Re: What should be added to C Message-ID: <936@mmm.UUCP> Date: Fri, 6-Jun-86 11:39:27 EDT Article-I.D.: mmm.936 Posted: Fri Jun 6 11:39:27 1986 Date-Received: Sun, 8-Jun-86 05:34:30 EDT References: <1462@mmintl.UUCP> <5498@alice.uUCp> <1497@mmintl.UUCP> <3542@reed.UUCP> Reply-To: mkr@mmm.UUCP (MKR) Organization: none Lines: 30 In article <3542@reed.UUCP> kab@reed.UUCP (Kent Black) writes: >In article <1497@mmintl.UUCP> franka@mmintl.UUCP (Frank Adams) writes: >>>> o An andif clause for if statements. >>You would write: >> if (A) { >> X >> } andif (B) { >> Y >> } else { >> Z >> } > >Which is equivalent to: > > if (A) { > X; > if (B) { > Y; > } > } else { > Z; > } > Correct me if I'm wrong ( :-) ), but the second example is not actually equivalent to the first. In the first I assume that Frank means that Z gets executed only if A *and* B are false. In the second, Z gets executed if A is false, regardless of B. --MKR