Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Str() how many decimal places can I be sure of
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00600182
Message ID:
00600301
Views:
22
>Hi All
>
>How many decimal places is it safe to go to when converting a numeric to a string
>
>When using STR(85.76,32,14), I get the string "85.76000000000001"
>
>Is there some limit that I can safely assume eg str(n,n,13)
>
>Thanks
>
>Simon

Hi Simon,

Check this thread Forum: Visual FoxPro Category: Coding, syntax & commands Title: Re: Check for number of digits in a number Thread #598086 Message #598140 Instead of using STR() you may just use alltrim(PADR(lnNumber,100))
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