TRUE and FALSE
Al Dunbar
userAKDU at mts.ucs.UAlberta.CA
Thu Sep 6 12:05:46 AEST 1990
In article <23970:Sep505:16:2390 at kramden.acf.nyu.edu>, brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:
>In article <5398 at harrier.ukc.ac.uk> mtr at ukc.ac.uk (M.T.Russell) writes:
>> To the people complaining about `if (x == TRUE)': YOU ONLY USE `TRUE' AND
>> `FALSE' FOR ASSIGNMENT AND PARAMETER PASSING. It's a fairly simple rule.
>
>Usage: truefalse flagfoo; set_true(&flagfoo); if (is_true(flagfoo)) ...
ARGH! the "is_true" is understood, and redundant ! 'if (flagfoo)'
means 'if flagfoo is true', in the same way that the following
two sentences mean (almost) exactly the same thing in English:
1) If it is raining you will get wet.
2) If it is true that it is raining you will get wet.
The is_true() macro is almost as useful as a macro you might
write to return the numeric value of its argument, i.e.:
a = value_of( b ) + value_of( c );
-------------------+-------------------------------------------
Al Dunbar |
Edmonton, Alberta | this space for rent
CANADA |
-------------------+-------------------------------------------
More information about the Comp.lang.c
mailing list