Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site watdaisy.UUCP Path: utzoo!watmath!watdaisy!ndiamond From: ndiamond@watdaisy.UUCP (Norman Diamond) Newsgroups: net.lang.c Subject: Re: Re: C Input Question? Message-ID: <7026@watdaisy.UUCP> Date: Sun, 3-Mar-85 16:13:57 EST Article-I.D.: watdaisy.7026 Posted: Sun Mar 3 16:13:57 1985 Date-Received: Mon, 4-Mar-85 06:35:48 EST References: <1556@ritcv.UUCP> <155@cci-bdc.UUCP> <362@enmasse.UUCP> Distribution: net Organization: U of Waterloo, Ontario Lines: 18 > I was reading Creative Computing when I saw the most bogus C programming > example. The author was comparing C to Basic- > Basic: if A=1 and B=1 goto 104950393040 [:-> > C: if (A==1 & B==1) foobar(); > Which works, of course, but it was clear from the context that the author > thought that '&' and logical AND were identical!!!! -- Mark Roddy It doesn't work if A == 1 and B == 3. It calls foobar when it shouldn't. -- Norman Diamond UUCP: {decvax|utzoo|ihnp4|allegra}!watmath!watdaisy!ndiamond CSNET: ndiamond%watdaisy@waterloo.csnet ARPA: ndiamond%watdaisy%waterloo.csnet@csnet-relay.arpa "Opinions are those of the keyboard, and do not reflect on me or higher-ups."