Solved

read an old file

Posted on 1999-01-25
8
126 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
Comment Utility
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
Comment Utility
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
Comment Utility
Hi Saxon, Hi KE,

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

except D4 i see.

meikl
0
 
LVL 12

Expert Comment

by:rwilson032697
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:Saxon
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Hey, my German must be improving - I understood most of that!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Deploying Delphi Application on Web Server 3 78
delphi custom sort exception 6 109
delphi exception 7 58
Delphi cmd execution 6 40
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now