Board index » delphi » pascal 'real' data to vb 'double'

pascal 'real' data to vb 'double'

Been trying to find an answer to this for ages unsuccessfully..

We have a data file on disc, written in Pascal originally, which has
some "real" (6-byte floating point number) numbers written in it as a
set of 6 consecutive bytes..

Because of the way the data is stored, we have to read it into a
byte-array in VB.. Now we need to get the numbers out of the byte
array, and into a Double format VB number..

Just can't figure out how to do it.. Anyone have any ideas?

Thanks,
Aaron

 

Re:pascal 'real' data to vb 'double'


Quote
"Az" <_aaro...@yahoo.com> wrote in message

news:3b826a89.20927742@news.demon.co.uk...

Quote
> Been trying to find an answer to this for ages unsuccessfully..

> We have a data file on disc, written in Pascal originally, which has
> some "real" (6-byte floating point number) numbers written in it as
a
> set of 6 consecutive bytes..

> Because of the way the data is stored, we have to read it into a
> byte-array in VB.. Now we need to get the numbers out of the byte
> array, and into a Double format VB number..

> Just can't figure out how to do it.. Anyone have any ideas?

Get the TP 5.5 compiler from the Borland Museum, and make a conversion
program. Read the file containing 'Real' variables, write a file
containing 'Single' or 'Double' and have VB chew on that instead.

TP versions 4 and newer understand the floating point formats used by
the FPU, as well as still being able to handle the 'real' format which
came from before the FPU was a twinkle in its mother's eye.

FP

Other Threads