Sign in Join

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

Mailing lists / lazarus / 2013-03

"nested" packed record?

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Xiangrong Fang

Hello,

Is the "packed" keyword effective for nested records? i.e.

TMyRecord = packed record
Component: *packed* record

        Field: Integer;
        ... ...
    end;
    ... ...

end;

Does Component have to be packed to ensure entire record is packed, or, "packed" is only required for the outmost record keyword?

Thanks,
Shannon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130307/0ae32416/attachment.html>

Reply by email

Mattias Gaertner
to Xiangrong Fang
Show quoted text 14 lines
Hello, Is the "packed" keyword effective for nested records? i.e. TMyRecord = packed record Component: *packed* record Field: Integer; ... ... end; ... ... end; Does Component have to be packed to ensure entire record is packed, or, "packed" is only required for the outmost record keyword?

Each "record" needs its own "packed".

Mattias

Reply by email