Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BitSet & Integer
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00919018
Message ID:
00919058
Vues:
12
>Should an integer be -2147483648 To -2147483648 ? Is VFP Integer definition different from other languages ? An integer is a 32 bit value no?
>
>
>>The integer field type can hold values in the range of -2147483647 to 2147483647. You're attempting to insert 2147483648 (2 ^ 31).

Consider that there are 4,294,967,295 possible values (2 ^ 32 - 1). With a signed integer the range is exactly half for the positive and negative values minus one. IOW, doing integer division on 4,294,967,295 yields +/- 2,147,483,647. So where's value 4,294,967,295? It's zero.
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