07-18-2022, 02:50 PM
Is this a problem with the return type that you're moving your variable back in to? As far as I can tell, MKD$ works as it should, and we haven't had any error reports with it before.
As you can see from the above, if we take a value from a double, convert it to a string, then convert it back to a different double, the value remains the same.
There is a loss of precision, however, when we try and put that same double value into a SINGLE, as we see with z.
If you can share some code that isn't working as expected, we'll be more than happy to look into it.
Code: (Select All)
Dim x As Double, y As Double
x = 3.141592654
t$ = MKD$(x)
y = CVD(t$)
z = CVD(t$)
Print x
Print t$
Print y
Print z
As you can see from the above, if we take a value from a double, convert it to a string, then convert it back to a different double, the value remains the same.
There is a loss of precision, however, when we try and put that same double value into a SINGLE, as we see with z.
If you can share some code that isn't working as expected, we'll be more than happy to look into it.