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:
00359120
Views:
10
>As I've said elsewhere in this thread this was a simply a curiousity to me. Personally, it doesn't make a bit of difference. Second, you know me well enough to know that whenever I make an API call that returns a BOOL, it's in the format of: llresult = (SomeBOOLAPICall() # 0).

I know. Not all explanations were meant for you. :)

>That aside, the curiousity was inspired because it (TRUE) seemingly isn't defined recursively (namely as in QB you'd do a CONST TRUE% = NOT FALSE). Whatever unary NOT returned became the value for TRUE. In this case, it happened to be the bitwise compliment.

Now, guess what: if TRUE were defined recursively, than TRUE would be !FALSE, which is 1. "!" is logical NOT, not
bitwise NOT, which is something different in C++.

Since TRUE is defined by a macro (#define) in C++, its definition as 1
(its actual definition is #define TRUE 1) is better. Macros are a big PITA in C++ and it's better to keep them
as simple as possible.

Vlad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform