Database converter : need help !

Everything else that doesn't fall into one of the other PB categories.
TeddyLM
Enthusiast
Enthusiast
Posts: 133
Joined: Wed Apr 30, 2003 2:04 pm
Location: Germany (French expat)

Database converter : need help !

Post 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.
TeddyLM
Enthusiast
Enthusiast
Posts: 133
Joined: Wed Apr 30, 2003 2:04 pm
Location: Germany (French expat)

Post 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 ?
Last edited by TeddyLM on Tue Apr 26, 2005 6:46 am, edited 1 time in total.
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post 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.
Post Reply