Page 1 of 1

Database converter : need help !

Posted: Mon Apr 25, 2005 1:50 pm
by TeddyLM
Hi all,

i'm working on a small database converter and have a problem with the NUMBER field structure (Paradox Table).
It's supposed to be a double-precision floating-point value (8 bytes, Big Endian, with 15 significant figures).
I edited a lot of files but can't figure out how these values are coded.
Do you have some experience with this ?
How can i convert the Hex codes to a readable decimal string ?

Thanks for your help.

Posted: Tue Apr 26, 2005 6:19 am
by TeddyLM
Allright, i found it !

The NUMBER field values are coded according to the IEEE-754 norm :
SEEEEEEEEEEEMMMMMMMMMM.....MMM (64 Bits)
S = Sign
E = Exponent
M = Mantisse

(Microsoft uses another structure : EEEEEEEEEEESMM.....MMMM)

OK i know how they are coded. But how can i convert the float value (64-Bits hexadecimal) to a string (decimal) with PB ? Is there any API function ?

Posted: Tue Apr 26, 2005 6:40 am
by dracflamloc
hmm.... well, theres StrF() and Hex() i think... dunno if those can handle what you've got though.

You're using the F64 lib I assume?

You could write your own function using division and remainders, but its pretty darn slow. The best bet would be to find a way to do it in asm.