Path: utzoo!utgpu!cunews!cognos!geovision!pt From: pt@geovision.gvc.com (Paul Tomblin) Newsgroups: comp.lang.c Subject: Re: Constants in conditionals, was Re: Are enums safe to use in portable code? Message-ID: <1424@geovision.gvc.com> Date: 19 Feb 91 02:11:14 GMT References: <9890@dog.ee.lbl.gov> <1991Feb18.113919.28217@watmath.waterloo.edu> Reply-To: pt@geovision.gvc.com Organization: GeoVision Corp., Ottawa, Ontario Lines: 18 datangua@watmath.waterloo.edu (David Tanguay) writes: >Oooo I hope not! I occasionally use constants in ifs. >"if( PATCH_MODE ) { ... }", where PATCH_MODE is a cpp macro (0 or 1). >I know I coud use #if (or #ifdef), but I find them too ugly. I could also >use an external, but then I don't get the dead code elimination. TOO UGLY! Don't come applying for a job here! Anybody who doesn't know how to use all the BASIC aspects of the C compiler, and relys on optimizations that probably aren't done on most of our machines (pcc based compilers) isn't going to be too popular at this company, and probably many many others. Sorry, but #ifdef or #if is SOOO basic, that if you don't know how to use it (or refuse to for wierd reasons), you loose. -- Paul Tomblin, Department of Redundancy Department. ! My employer does The Romanian Orphans Support Group needs your help, ! not stand by my Ask me for details. ! opinions.... pt@geovision.gvc.com or {cognos,uunet}!geovision!pt ! Me neither.