Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BOOL Datatype
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00357504
Message ID:
00359184
Vues:
14
>>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++.

Now that I was unaware of. My ignorance of C++ is showing.:-)

>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.
>
Agree completely.

As a side note, and having absolutely nothing to do with the original question, we can see the power of recursive definitions in VFP, and more specifically, OOP itself. That's the whole premise behind it. Base Class -> Abstract Class -> Defined Class.:-)
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform