Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Serious Error with Currency Data Type
Message
 
À
18/01/1999 19:37:16
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00177250
Message ID:
00177562
Vues:
44
Hi Calvin,

>I have now RTFM and my question now becomes- Of what use is the currency type if you can't do any d..m thing with it.

You can use it for amounts, even adding amounts, but not for calculations. Although a currency looks like a numeric value, it's not numerical, it's a currency. See it as an entirely different data type. Just like you can'r multiple a string with 0.000015, you can't multiply a currency with 0.000015. In both cases a so called type casting is necessary. In VFP we have only few type casting rules. Actually, I can only think of two:

Integer are converted to numericals when you perform a calculation with numeric values. And numeric values are converted to currency when you try to mix both. If you need something different, you have to use explicit type casting, like:

integer * INT(numerical)

or

MTON(currency) * numerical

Christof
--
Christof
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform