On 03.03.2013 10:57, Xiangrong Fang wrote:
Ok, My purpose is to write the record into stream, so I cannot use
variable length. Now I use an array [0..MaxPathLen] of Char.
If you want to write a complete record to stream (and not write it's
elements manually) you should declare your record as "packed" as only
then the records are guaranteed to be the same on different plattforms
(with the exception of different endianess).
E.g.
=== code begin ===
type
TConfiguration = packed record
//
end;
=== code end ===
See also here: http://community.freepascal.org/docs-html/ref/refsu15.html
Regards,
Sven
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus