General information
Category:
Windows API functions
Well the same argument goes for 1 as well as for -1! Regardless of the number of bytes used to store a logical
value, NOT 0 equals 1 (even if not bitwise NOT). One important reason may be that with 1 as TRUE, eventually,
a logical value could be stored on only one bit (which would not be possible with -1).
Vlad
>I'm not sure why you're surprised. C++ does use a non-zero value positive integer, 1. VB, OTOH, uses -1. The latter I can understand because regardless of the number of bytes, the bitwise compliment (NOT 0, or in VFP BITNOT(0)) of 0 (False) will be -1. Defining True recursively as NOT False makes more sense to me than defining it independently.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only