Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Interpreting Pascal REAL variables

Status
Not open for further replies.

wgcs

Programmer
Mar 31, 2002
2,056
EC
I have the challenge of loading data out of a file that was created by a Borland Pascal (v7) program. The file was a typed file, and had Records written to it, some of the fields of which are of type "real".

I stumbled on thread935-574230 through Google, and thought someone here might be able to help.

Basically, I need to interpret the binary Real value and recalculate it into a number I can use.

So far I've determined a Real is 6 bytes long (48bits). I found this page:

Which helps a little, but only addresses 32bit and 64bit reals... (plus, I have to admit, I haven't yet determined exactly what to do with the mantissa, exponent and remainder...)
 
I know this isn't what you're after, but you could try object oriented (my knowledge of this is very limited). I think you can use variables used by other people, without knowing the source, in a program or extension you have written. But then again, I guess the origonal needs to be OOP aswell.

Could you elaborate on what you *actually* have regarding the value of the real?

~*Gwar3k1*~
"To the pressure, everything's just like: an illusion. I'll be losing you before long..."
 
You know everything! *in awe*

~*Gwar3k1*~
"To the pressure, everything's just like: an illusion. I'll be losing you before long..."
 
Thanks for finding the info... I've successfully accomplished the binary conversion: thread184-622842
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top