Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dumbed out on a string
Message
 
 
À
22/08/2001 14:21:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00547498
Message ID:
00547508
Vues:
14
This message has been marked as a message which has helped to the initial question of the thread.
>i don't know if i left my brain at home this morning, but a simple thing is eluding me...
>
>x=21.22
>?x
>and i get 21.22
>?str(x)
>and i get 21
>
>wut happened to the decimals?
>
>tia - john

John,
By default, Str() will truncate your decimal places. You have to specify the number of decimla places in the second parameter. To avoid this, you could use the Transform() function whcih will convert the number as is with all of it decimal places intact.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform