C Style

SuperUser root at mfci.UUCP
Mon Apr 25 15:30:09 AEST 1988


Expires:

Followup-To:

Distribution:

Keywords:


In article <601 at vsi.UUCP> friedl at vsi.UUCP (Stephen J. Friedl) writes:
>Techinically, shouldn't TRUE be `1U' if it goes into a bitfield?
>I'm not sure but would like to hear some thoughts on this...

TRUE should have the same type and value as the constant expression (0 == 0).
Similarly, FALSE should have the same type and value as the constant
expression (0 != 0).  This principle holds for any language.  In the case
of C, TRUE and FALSE are signed 1 and signed 0, resp.



More information about the Comp.lang.c mailing list