Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

read an old file

Posted on 1999-01-25
8
Medium Priority
?
133 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 200 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

609 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