Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to check decimal points
Message
De
14/06/2004 16:45:43
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00913595
Message ID:
00913626
Vues:
27
Hi Sergey,

thank you for pointing out this use of PADL. It seems to be the only way to get all the decimals independing of set fixed... I have searched a long time for something likethis but I have never looked that close to te function.

Agnes

>>Hi all,
>>
>>Is there a way to know how many decimal places a current variable has?
>>
>>Example:
>>x=1.000
>>y=3.0
>>z=5.12004
>>* How to get the decimal places for each variable?
>>
>>
>Try
>lnNumber = 1.000
>lcStr = PADL(lnNumber,20)
>IF AT(".", lcStr) = 0
>  ? 0
>ELSE
>  ? LEN(SUBSTR(lcStr, AT(".", lcStr)+1))
>ENDIF
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform