Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!nosc!ucsd!rutgers!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Definition of boolean type Message-ID: <9753@smoke.BRL.MIL> Date: 1 Mar 89 05:45:18 GMT References: <10@dbase.UUCP> <1989Feb10.092449.20875@sq.uucp> <6849@pogo.GPID.TEK.COM> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 10 In article <6849@pogo.GPID.TEK.COM> rickc@pogo.GPID.TEK.COM (Rick Clements) writes: >With the compiler I am currently using, I use "if (x == FALSE)" or >"if (x != FALSE). ... The compiler I am using generates LESS code >this way. ("if (x)" causes it to go to the work of converting it to >a 1 or 0 with some less than efficient code. That's pretty strange -- "if(x)" means no more and no less than "if x is nonzero", which nearly all instruction sets support directly. It's easy to imagine a dumb compiler that produces MORE code for "if(x!=0)" but not one that produces LESS code.