07-18-2022, 05:06 PM
Here is a snippet from QB that I executed in QB:
a = 91234.56
b$ = MKD$(a)
1 c = CVD(b$)
2 PRINT c
PRINT b$
OPEN "O", 1, "testmkd" 'sent it a file
WRITE #1, b$
CLOSE 1
The result of lines 1-2 correctly yields the proper value of "a".
--------------------------------------------------------------------------------------
Here is the QB64 code I used to test b$ that I wrote to the file:
Open "I", 1, "testmkd"
Input #1, b$
1 Print CVD(b$)
2 Print CVDMBF(b$)
close 1
OUTPUT:
-7.6795... D-226 (line 1)
91234.5625 (line 2)
As you can see only line 2 correctly interpreted the string b$ back to the original value of a in QB.
Arnold
a = 91234.56
b$ = MKD$(a)
1 c = CVD(b$)
2 PRINT c
PRINT b$
OPEN "O", 1, "testmkd" 'sent it a file
WRITE #1, b$
CLOSE 1
The result of lines 1-2 correctly yields the proper value of "a".
--------------------------------------------------------------------------------------
Here is the QB64 code I used to test b$ that I wrote to the file:
Open "I", 1, "testmkd"
Input #1, b$
1 Print CVD(b$)
2 Print CVDMBF(b$)
close 1
OUTPUT:
-7.6795... D-226 (line 1)
91234.5625 (line 2)
As you can see only line 2 correctly interpreted the string b$ back to the original value of a in QB.
Arnold