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:
00144415
Vues:
31
>Hi George,
>As we added in our letter, we are trying to avoid the afields() function due to the situation that we are in. Any other ideas come to mind??
>
>Sandy


If you use the PADR function with the numeric value to a length longer than you expect, you can then find out the # of decimal places by trimming off the trailing blanks and doing a RAT to locate the decimal point in relation to the length of the string.

nVal = 1.2345
cVal = ALLTRIM(PADR(nVal,10))
nDec = LEN(cVal)-RAT('.',cVAL)
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform