Please note that when you define an entry in Delphi (for example, struct in C), the fields are laid out in order and in binary format, taking into account the current alignment (for example, bytes are aligned by 1 byte boundaries, words by 2 bytes, integers by 4 bytes, etc., but it may vary depending on the compiler settings.
When serializing to a file, you probably mean that this record is written in binary form to a file, and the next record is written after the first, starting from the position of sizeof (structure), etc. etc. Delphi does not indicate how it should be serialized to / from a file, so the information you give leaves us with fortune-telling.
If you want to make sure that this is always the same without the intervention of any compiler settings, use a packed entry.
A real one can have several values ββ(this is a 48-bit float type for older versions of Delphi, and then a 64-bit float (IEEE double)).
If you canβt access the Delphi code or compile it yourself, just check the data using the HEX editor, you should clearly see the boundaries of the records, since they start with integers and only floats follow.
Ritsaert hornstra
source share