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:
00358514
Vues:
16
Well the same argument goes for 1 as well as for -1! Regardless of the number of bytes used to store a logical
value, NOT 0 equals 1 (even if not bitwise NOT). One important reason may be that with 1 as TRUE, eventually,
a logical value could be stored on only one bit (which would not be possible with -1).

Vlad

>I'm not sure why you're surprised. C++ does use a non-zero value positive integer, 1. VB, OTOH, uses -1. The latter I can understand because regardless of the number of bytes, the bitwise compliment (NOT 0, or in VFP BITNOT(0)) of 0 (False) will be -1. Defining True recursively as NOT False makes more sense to me than defining it independently.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform