Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert number to string and back
Message
From
31/03/2008 12:32:15
 
 
To
31/03/2008 12:28:46
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01306961
Message ID:
01307009
Views:
9
>>Does TRANSFORM() work for you?
>>
>>? TRANSFORM(1234.56000) && you should get the string "1234.56000"
>
>Fred
>
>Yes it does, now how do you get 1234.56000 back, as a number, like:
>
>
>lnx = 123.45678
>lcx = transform(lnx)    && "123.45678"
>lny = somefunction(lcx) && get 123.45678 type numeric back
>
>
>
>Carlos

Numeric values don't care how many decimal places you have. Your value would be correct just by using VAL() on the string, but be cautious, it may depend on set decimals to "see" it correctly.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform