General information
Category:
Windows API functions
>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
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