🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #1873

Re: true/false literal std question

#1873
From: Alan Griffiths
Date: Thu, 31 Aug 1995 14:51
43 lines
2199 bytes
In article <9508310634.1386@mulga.cs.mu.OZ.AU>
           fjh@munta.cs.mu.OZ.AU "Fergus Henderson" writes:

> "Brian T. Hill" <bhil@strata3d.com> writes:
> 
> >Who wants to use "true" or "false" in the preprocessor anyway? 
> 
> I do.
> 
> >What are you going to do:  #if true ... ?
> 
> Yes!  Amoung other uses, I'd use `#if true' rather than `#if 1'.
> I don't use `#if 1' very often, but I do use it occaisionally...
> The code ususally looks something like this:
> 
>         #if 1
>                 // alert! this is a temporary hack!!
>                 hack(); hack(); hack();
>         #else
>                 // this code disabled because ...
>                 ...
>         #endif

What's so wrong with saying what you mean:

    #ifndef USE_ORIGINAL_UNHACKED_CODE
        hack(); hack(); hack();
    #else
        // This code disabled because
        ...
    #endif

The point is why change the language to support your idiosyncacies?

-- 
Alan Griffiths               | Also editor of: The ISDF Newsletter
Senior Systems Consultant,   | (An Association of C and C++ Users publication)
CCN Group Limited.           | (ISDF editor  : isdf@octopull.demon.co.uk)
(agriffiths@ma.ccngroup.com) | (For ACCU see : http://bach.cis.temple.edu/accu)
---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID: <809869855snz@ma.ccngroup.com>
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back
References: <4167na$nv9@engnews2.Eng.Sun.COM> <416oev$71f@mujibur.inmind.com> <417kfc$1q3@engnews2.Eng.Sun.COM> <41881c$ihs@mujibur.inmind.com> <MATT.95Aug21105142@physics2.Berkeley.EDU> <9508310634.1386@mulga.cs.mu.OZ.AU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back
Date: 31 Aug 95 14:51:38 GMT
Approved: fjh@cs.mu.oz.au
Return-Path: <daemon@ncar.UCAR.EDU>
From: Alan Griffiths <aGriffiths@ma.ccngroup.com>
Newsgroups: comp.std.c++
Subject: Re: true/false literal std question
X-Original-Date: Thu, 31 Aug 95 11:50:55 GMT
Organization: CCN Market Analysis
Message-ID: <809869855snz@ma.ccngroup.com>
References: <4167na$nv9@engnews2.Eng.Sun.COM> <416oev$71f@mujibur.inmind.com> <417kfc$1q3@engnews2.Eng.Sun.COM> <41881c$ihs@mujibur.inmind.com> <MATT.95Aug21105142@physics2.Berkeley.EDU> <9508310634.1386@mulga.cs.mu.OZ.AU>
Reply-To: aGriffiths@ma.ccngroup.com
X-Newsreader: Demon Internet Simple News v1.29