Solved

read an old file

Posted on 1999-01-25
8
127 Views
Last Modified: 2010-04-06
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?
0
Comment
Question by:Saxon
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 3

Expert Comment

by:KE
ID: 1363284
I don't know for D3 - in D4 there's a special Real48 type to deal with old style 6 byte reals.

0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 1363285
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
 
LVL 27

Expert Comment

by:kretzschmar
ID: 1363286
Hi Saxon, Hi KE,

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

except D4 i see.

meikl
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 12

Expert Comment

by:rwilson032697
ID: 1363287
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
 

Author Comment

by:Saxon
ID: 1363288
partially means that i get 0 or values like -6.89764587638756e-18
i´ll try $A and packed
sorry for delay
0
 

Author Comment

by:Saxon
ID: 1363289
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
 
LVL 27

Accepted Solution

by:
kretzschmar earned 50 total points
ID: 1363290
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
 
LVL 12

Expert Comment

by:rwilson032697
ID: 1363291
Hey, my German must be improving - I understood most of that!
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi 2 61
How to debug For loops? 3 51
Why can't I create any project with my delphi EXE file? 6 28
firemonkey keyboard covers the controls 1 27
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question