Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bitand on more than 32 bits
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00751377
Message ID:
00751853
Vues:
22
In addition to what Gregory has said, I think you need to use 0x80000000 rather than 0xffffffff in the expression.
x = 2^32 + 2^31
y = 2^32 + 2^31
? x      && 6442450944

* this will give a result of 2147483648
? BITAND(INT(x/0xffffffff),INT(y/0xffffffff))*0xffffffff;
+ BITAND(MOD(x,0xffffffff),MOD(x,0xffffffff))

* this gives 6442450944
? BITAND(INT(x/0x80000000),INT(y/0x80000000))*0x80000000;
+ BITAND(MOD(x,0x80000000),MOD(x,0x80000000))
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform