Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Only currency is sure computation decimals values ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00798893
Message ID:
00799703
Vues:
49
Hi Garrett,

thanks, now I have understood all.

My mistaken is for Numeric attribute, on MSQL numeric is fixed point.

you can comment my affirmations?

- VFP haven't DECIMAL data type.

- Then only fixed point on VFP are CURRENCY and INTEGER.

- N(X,Y) is LEFTFLOAT(X): X positions with max Y decimals.

- VFP convert MSQL field DECIMAL(X,Y) to N(X+2,Y),
but calculation is done with this schema:
- every N(X+2,Y) is read from table and convert to double floating point memory variable
- any intermediate value is stored in double floating point memory variable
- ROUND(result,Y) is stored into the N(X+2,Y) field.

- VFP support MSQL field only for read or for write edit value;
to execute a sum in VFP and MSQL of the same table numeric values can give various result.

-Sums of identical integers in VFP and MSQL return always equal integer value? Yes, eccept for -2147483.648.

- Sums of identical currency in VFP and MSQL return always equal integer value? Yes, eccept for -922337203685477.5808.

- Sums of identical double in VFP and MSQL return always equal integer value? No?

- Sums of identical nemeric in VFP and MSQL return always equal integer value? No.

----

My comment: all this is worse than a bug, it is a virus.

Thanks
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform