Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dumbed out on a string
Message
 
 
To
22/08/2001 14:21:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00547498
Message ID:
00547508
Views:
7
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
Previous
Reply
Map
View

Click here to load this message in the networking platform