?
Solved

read an old file

Posted on 1999-01-25
8
Medium Priority
?
131 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
Industry Leaders: 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month12 days, 18 hours left to enroll

777 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