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:
00358358
Vues:
19
>>>That not really true - there are LOTS of structs that use individual bits to designate boolean condition (oy - just try digging around inside a PIF some time) and the cost of a logical AND operator is very small in C.
>>>
>>>You make some bad assumptions - many of the C structures are designated as machine-dependent; a ULONG and a DWORD are not necessarily the same if you move out of the Win32 platform.
>>
>>Ed,
>>
>>While it really doesn't matter one way or another what the definition of TRUE really is, it should be, to my way of thinking, the exact opposite of FALSE. If none of the bits are set in FALSE, then the exact opposite would be to to have all of them set for TRUE. Admittedly, we're dealing with signed integers here, but this isn't something that necessarily applies to any specific processor. In all cases, the exact opposite of a byte (or bytes) which have a value of 0, will be a byte where all the bits are set. Whether or not it's interpreted as -1 or 255 (in the case of one byte) is another matter entirely.
>
>If the value is represented as a bool, then one bit of the byte represents the negation 0 or 1.

That's what I've been say at the bit level. What about byte, word, dword, etc.? Not really a big deal. As I said elsewheres, this piqued my curiousity is all.
George

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

Click here to load this message in the networking platform