I have hunted about quite a bit but can't find a way to get at the Hexadecimal or Binary representation of the content of a Double variable in VB6. (Are Double variables held in IEEE754 format?)
The provided Hex(x) function is no good because it integerizes its input first. So if I want to see the exact bit pattern produced by Atn(1), Hex(Atn(1)) does NOT produce it.
I'm trying to build a mathematical function containing If clauses. I want to be able to see that the values returned on either side of these boundaries are, as closely as possible, in line.
Any suggestions?
Yes, VB6 uses standard IEEE format for
Double. One way to get what you want without resorting tomemcpy()tricks is to use two UDTs. The first would contain oneDouble, the second a static array of 8Byte.LSetthe one containing theDoubleinto the one containing theBytearray. Then you can examine eachBytefrom theDoubleone by one.If you need to see code let us know.
[edit]
At the module level:
Then:
To use it:
This is air code but it should give you the idea.