The value FALSE is not a constant for the number 0, it is a boolean value that indicates FALSE.  The value TRUE is also not a constant for 1, it is a special boolean value that indicates TRUE.  It just happens to cast to integer 1 when you print it or use it in an expression, but it's not the same as a constant for the integer value 1 and you shouldn't use it as one.

A boolean expresses a truth value. It does not say "a boolean expresses a 0 or 1".

The symbolic constants are specifically designed to always and only reference their constant value.  But booleans are not symbolic constants, they are values.

0 comments:

Blog Archive

Total Pageviews

Popular Posts