Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert number to string and back
Message
 
 
To
31/03/2008 12:47:16
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:
01307028
Views:
14
>>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.
>
>Yes, I was having issues with decimal values being lost or rounded up to 2 decimals. Seems that Gregory´s code is inmune to "SET" settings, except for the SET POINT TO "." caveat.
>
>Thank you for your comments,
>
>Carlos

Try something with the E, e.g.

myNumber = 1.2e12

What would you get with PADR and evaluate ?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform