Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucsfcgl.ucsfcgl.UUCP Path: utzoo!watmath!clyde!burl!ulysses!ucbvax!ucsfcgl!arnold From: arnold@ucsfcgl.UUCP (Ken Arnold%CGL) Newsgroups: net.lang.c Subject: Re: What should be added to C (booleans) Message-ID: <9874@ucsfcgl.ucsfcgl.UUCP> Date: Wed, 4-Jun-86 23:19:44 EDT Article-I.D.: ucsfcgl.9874 Posted: Wed Jun 4 23:19:44 1986 Date-Received: Sat, 7-Jun-86 05:36:27 EDT References: <590@brl-smoke.ARPA> <3570@nsc.UUCP> <1462@mmintl.UUCP> Reply-To: arnold@ucsfcgl.UUCP (Ken Arnold%CGL) Organization: Computer Graphics Laboratory, UCSF Lines: 23 In article <2176@mit-eddie.MIT.EDU> Barry Margolin writes: >I think your worries are unfounded. The difference between (1 == 1) and >1 is that the former indicates to human readers of the code that the >expression is being used for its truth value. In the statement > var = 1; >the reader is likely to assume that var is going to be used >arithmetically. Actually, the *real* difference between "(1 == 1)" and "1" is that the former causes lint to complain that a constant is being used in a conditional context *every time you use it*. This is no fun at all. I mean, really. Isn't var = TRUE; just as descriptive? Why not do that, with # define TRUE 1 # define FALSE 0 Ken Arnold