Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BOOL Datatype
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00357504
Message ID:
00358514
Views:
12
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
Map
View

Click here to load this message in the networking platform