more on TRUE and FALSE (side-comment)

Al Dunbar userAKDU at mts.ucs.UAlberta.CA
Sun Sep 30 01:30:38 AEST 1990


In article <4673 at tuminfo1.lan.informatik.tu-muenchen.dbp.de>, weiske at lan.informatik.tu-muenchen.dbp.de (Thomas Weiske) writes:
>I use some very useful header files because I cant remember
>the actual encoding of TRUE/FALSE. Actually I cant remember
>the correct writing of True or False, sometimes I prefer
>true and false depending on the context to get a nice C
>Program Layout.
>Here is the first one:
>---x---x---x---x---x---x---x---x---x---x---
>#define TRUE    ((0)==(0))
>#define True    TRUE
>#define true    True
>#define FALSE   ((1)==(2))
>#define False   FALSE
>#define false   False
>---x---x---x---x---x---x---x---x---x---x---
>To make the definitions more tolerant to typos
>you can add
>'Treu' or 'Fasle' a.s.o.
>The interesting thing is the compatibility to
>all in this newsgroup suggested encodings of
>TRUE and FALSE without any loss of runtime speed!
>
an interesting concept! You could also define FOUR, FORE, and
FOYER (in various combinations of upper/lower case) as 'for',
just in case one day you forgot how to spell 'for'. That would
certainly give you a nice "program layout".
 
-------------------+-------------------------------------------
Al Dunbar          |
Edmonton, Alberta  |   this space for rent
CANADA             |
-------------------+-------------------------------------------
#! r



More information about the Comp.lang.c mailing list