Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ut-ngp.UTEXAS Path: utzoo!linus!philabs!cmcl2!seismo!ut-sally!ut-ngp!kjm From: kjm@ut-ngp.UTEXAS (Ken Montgomery) Newsgroups: net.lang.c Subject: Re: No Such Thing Message-ID: <2307@ut-ngp.UTEXAS> Date: Tue, 27-Aug-85 14:50:29 EDT Article-I.D.: ut-ngp.2307 Posted: Tue Aug 27 14:50:29 1985 Date-Received: Thu, 29-Aug-85 21:42:52 EDT References: <10176@ucbvax.ARPA> <5118@mit-eddie.UUCP> Organization: UTexas Computation Center, Austin, Texas Lines: 33 From: barmar@mit-eddie.UUCP (Barry Margolin) >To me, the mapping TRUE -> 0 and FALSE -> non-zero doesn't seem obvious, >and I'm sure it isn't to most programmers who ever worked in assembler. Not to me, at least. I write nearly nothing but assembler code (using a UNIX fullscreen editor I wrote, in C). I have no trouble going between C and assembler. In assembler, truth is what you make it. :-) > [...] No such memory is needed for the >assembler, of course, since comparison is merely done by subtraction, > [...] so it is obvious what the zero indicator >means. It is not so obvious to me that in C 0 should mean false and 1 >mean true. All of my flag variables in assembler are 'true' when non-zero. I prefer this convention because the obvious 'true' value when working with packed flag fields is 1. Also, I'm no great fan of doing negative logic in software, which is what you get when you make 'true' be 0. >-- > Barry Margolin > ARPA: barmar@MIT-Multics > UUCP: ..!genrad!mit-eddie!barmar -- The above viewpoints are mine. They are unrelated to those of anyone else, including my cat and my employer. Ken Montgomery "Shredder-of-hapless-smurfs" ...!{ihnp4,allegra,seismo!ut-sally}!ut-ngp!kjm [Usenet, when working] kjm@ngp.{UTEXAS.EDU, ARPA} [Pick one. It might work.]