Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding the decimal
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00144345
Message ID:
00144501
Vues:
24
Hi Sandy,

>How do we find how many decimal places there are.

As Fred wrote, if you want to avoid AFIELD(), PADR() (or PADL()) will do the trick:

IIF( 20-RAT(".",PADL(,20))==20, 0, 20-RAT(".",PADL(,20)) )

This expression evaluates to the number of decimal places after the point.

>We can't use str() because it seems to stop at the decimal point.

STR() requires the number of decimals as the third parameter. If there are more than specified, it will round the value.

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

Click here to load this message in the networking platform