Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 beta 3/9/83; site tellab2.UUCP Path: utzoo!linus!decvax!tektronix!uw-beaver!cornell!vax135!houxz!houxm!ihnp4!tellab1!tellab2!thoth From: thoth@tellab2.UUCP (Marcus Hall) Newsgroups: net.lang.c Subject: Re: expressions and #if Message-ID: <165@tellab2.UUCP> Date: Tue, 24-Jul-84 14:40:45 EDT Article-I.D.: tellab2.165 Posted: Tue Jul 24 14:40:45 1984 Date-Received: Fri, 27-Jul-84 02:20:42 EDT References: <2104@rlgvax.UUCP>, <319@harvard.ARPA> Organization: Tellabs, Inc., Lisle, Ill. Lines: 27 How about using the cpp #ifdef this way: #ifdef FEATURE if (not_otherwise_indicated()) #endif FEATURE { process (); ... } To me it is just as clear (maybe even a little more) than saying: if (FEATURE == disabled || not_otherwise_indicated()) { process (); ... } Plus, it is more obvious that the test is optionally compiled. I know that this does get into some heavy problems when there are lots of #ifs around in a file, so if there are lots of them it does present a problem. My objection to the later form is that I keep trying to relate the expression 'FEATURE == disabled' to the execution of the code, not to the execution of the test. marcus ..!ihnp4!tellab1!tellab2!thoth