Information générale
Catégorie:
Fonctions Windows API
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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement