W wdegler Active Member Licensed User Longtime User Oct 20, 2011 #1 I wish to convert floating point values to strings. Here is example code: Dim Str As String Dim Flt As Float Flt=10.2 Str=Flt Msgbox(Str,"Str=") I get Str=10.199999809265137. I want Str=10.2. What can I do to get the results I want without limiting needed precision?
I wish to convert floating point values to strings. Here is example code: Dim Str As String Dim Flt As Float Flt=10.2 Str=Flt Msgbox(Str,"Str=") I get Str=10.199999809265137. I want Str=10.2. What can I do to get the results I want without limiting needed precision?
W wdegler Active Member Licensed User Longtime User Oct 20, 2011 #3 The problem remains Thank you for your response. The problem is that this solution limits precision. For example: If Flt=10.256, then I get Str=10.26. I want Str=10.256. Upvote 0
The problem remains Thank you for your response. The problem is that this solution limits precision. For example: If Flt=10.256, then I get Str=10.26. I want Str=10.256.
W wdegler Active Member Licensed User Longtime User Oct 20, 2011 #5 I have to use a way around this problem Thanks again for your input. I now see that the origin of the numbers are from file or keyboard input and hence, were originally strings. I will have to go back to the original input form rather than use the floating point form to get what I want. Upvote 0
I have to use a way around this problem Thanks again for your input. I now see that the origin of the numbers are from file or keyboard input and hence, were originally strings. I will have to go back to the original input form rather than use the floating point form to get what I want.
agraham Expert Licensed User Longtime User Oct 20, 2011 #6 You didn't explain your problem very well but I assume you are suffering from this effect. Upvote 0