Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BOOL Datatype
Message
From
13/04/2000 00:31:01
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00357504
Message ID:
00359117
Views:
10
I agree with you that boolean values should be treated as boolean and not as numbers, wherever and wenever
possible.

But C/C++ has this convention that any non-zero value is true and zero is false and, when dealing with C/C++ code,
one should be aware of it, otherwise...

Vlad

>I still think it's a big mistake to assume that TRUE & FALSE have numeric values. The nature of computers is that they have to be stored in bits & bytes, it is how they are interpreted, a 4 byte floating point number could be looked at as represented by 4 single byte integers, but no one would really consider doing that, so why discuss the integer value of logical representations ? 0 just happens to be a convenient representation for FALSE, allowing use of processor flags, but there is no reason why this should be the case.
>
>Regards
>Mike
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform