[fpc-pascal] Implementation of variant records
Ralf Quint
freedos.la at gmail.com
Sun Jul 7 02:55:29 CEST 2019
On 7/6/2019 12:21 PM, Florian Klaempfl wrote:
> Am 05.07.2019 um 13:53 schrieb Ralf Quint:
>> Shouldn't a PACKED Record guarantee that values are aligned at the byte
>> level?
> It does in TP, but the ISO says only that it shall be economised.
>
Well, the ISO is probably what has done most of the damage to Pascal.
AFAIK, the ISO doesn't not actually specify any "packed record" per se,
but there is an explicit PACK and UNPACK procedures to more economically
store sets and arrays (and possibly records, I would have to look up the
ISO text to be certain). For example this would be something to create
bit fields, pretty much the only feature of C that I sometimes miss in
(Free)Pascal.
For me, the use of packed records is a feature that facilitates the easy
exchange of stored data between architectures, something that a lot of
people these days with their mania about 64bit this and 64bit that are
often forgetting or chose to ignore...
Ralf
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
More information about the fpc-pascal
mailing list