read an old file

i try to read an old data file containing records with the same structure (strings, integers, user types, reals, ...) created with a tpw-program. i can read all this values but reals partially only. i thought the real of tpw and d3 is even the same!
what should i do?
SaxonAsked:
Who is Participating?
 
kretzschmarConnect With a Mentor Commented:
Hi Lutz,

ich freue mich, daß ich dir helfen konnte.
In diesem Sinne wünsche ich dir für die Zukunft viel Spaß und möglichst wenig Probleme beim Programmieren mit Delphi.

meikl :-)
0
 
KECommented:
I don't know for D3 - in D4 there's a special Real48 type to deal with old style 6 byte reals.

0
 
kretzschmarCommented:
Hi Saxon,

the real-typ is the same as in the whole pascal family from Borland.
Try other types (single, double, extended...).

How shows the partially real?
Maybe you should use the compiler-directive {$A-}, or otherwise, if A-.
Maybe you should use the keyword packed in your recorddefinition, or otherwise, if packed.

meikl

0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
kretzschmarCommented:
Hi Saxon, Hi KE,

      the real-typ is the same as in the whole pascal family from Borland.

except D4 i see.

meikl
0
 
rwilson032697Commented:
Yup - Borland toasted the real type in D4, you will need to use some code to convert between the real type and IEEE double.

I can provide this if you like.

Raymond.

0
 
SaxonAuthor Commented:
partially means that i get 0 or values like -6.89764587638756e-18
i´ll try $A and packed
sorry for delay
0
 
SaxonAuthor Commented:
it´s working now! i changed my d3 record to packed and the sun grews up!
kretzschmar should receive the points!
Ich danke Dir!
Lutz
0
 
rwilson032697Commented:
Hey, my German must be improving - I understood most of that!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.