Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2011-06

6 byte real

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Alain Van Muylem

Dear all,

I discovered Free Pascal yesterday and I am working at recompilying my old Turbo Pascal (5.0) files. The first problem (but probably not the last) I encountered is the reading of my old data files (files of record of real) because of the 6 byte coding for real type in Turbo Pascal versus the 8 byte coding in free Pascal. Is there a simple way to fix that? Regards
Alain

Reply by email

Jonas Maebe
to Alain Van Muylem
Alain Van Muylem wrote 6 lines
I discovered Free Pascal yesterday and I am working at recompilying my old Turbo Pascal (5.0) files. The first problem (but probably not the last) I encountered is the reading of my old data files (files of record of real) because of the 6 byte coding for real type in Turbo Pascal versus the 8 byte coding in free Pascal. Is there a simple way to fix that?

Use the real48 type: http://www.freepascal.org/docs-html/rtl/system/real48.html

The system unit includes overloaded assignment operators so you can directly assign fields of this type to double/extended afterwards.

Jonas

Reply by email