Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determining the number of decimal places of a variable?
Message
 
À
28/02/2003 18:00:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00759689
Message ID:
00760004
Vues:
15
Steve,

VFP7 will hold the precision for the transform as long as the value is not a whole number. If you have the following:
x = 20.000
? TRANSFORM(x)  && Returns 20
x = 20.1234
? TRANSFORM(x)  && Returns 20.1234
So therefore the transform does not solve the problem but the PADR() does. Originally, I did use transform for my Report Engine but when I found out I was losing precision on the whole numbers with desired decimal positions, I had to find another way.

But, I'm glad I know this now.

> Are you using VFP6? Transform works for VFP7...see Re: LEN() for numeric expresions
> Thread #716929 Message #716960 and surrounding discussion.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform