Mail Archives: djgpp/1999/04/13/14:10:27
"Rafael García" <rafael AT geninfor DOT com> wrote:
>typedef char /*int*/ BOOL;
>#define TRUE 1
>#define FALSE 0
Well, FALSE can reasonably be assumed to be zero. But there is
nothing to say (in the various standards for C, C++, or C9X) that TRUE
is necessarily one. It is any non-zero number, including negative.
Make tests against FALSE by all means, but testing for 'TRUE' as a
specific value is asking for trouble.
--
Graham Patterson http://www.btinternet.com/~g.a.patterson/
*** Unless otherwise stated, opinions expressed are mine ***
- Raw text -