shivakumarthota
July 1st, 2002, 01:49 AM
I have a problem:
I wanted to convert a byteString to Double. The ByteString is sent by a remote server and I have to convert this to a double. After receving few ideas from this very forum I was able to fix this problem.
But a new problem has surfaced. When a byteString that is sent has less than eight bytes, I am not able to convert it to the correct double value.
For example, If I received a value 4E40, which is of two bytes and whose decimal value is 60. My program gives me an output that looks like ::: 60000000
that is the rest of the eight bytes of a double value are being padded with zero's.
Please suggest and help me. Thank you in advance
Shivakumar Thota
shivatk@hotmail.com
I wanted to convert a byteString to Double. The ByteString is sent by a remote server and I have to convert this to a double. After receving few ideas from this very forum I was able to fix this problem.
But a new problem has surfaced. When a byteString that is sent has less than eight bytes, I am not able to convert it to the correct double value.
For example, If I received a value 4E40, which is of two bytes and whose decimal value is 60. My program gives me an output that looks like ::: 60000000
that is the rest of the eight bytes of a double value are being padded with zero's.
Please suggest and help me. Thank you in advance
Shivakumar Thota
shivatk@hotmail.com