[fpc-pascal] 6 byte real
jonas.maebe at elis.ugent.be
Fri Jun 24 13:18:24 CEST 2011
On 24 Jun 2011, at 13:08, Alain Van Muylem wrote:
> 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.
More information about the fpc-pascal