In your pre-Unicode version of Delphi, WriteStr
and ReadStr
write and read an AnsiString
value. The writing code writes the length, and then the string content. The reading code reads the length, allocates the string, and then fills it with the content.
This has the potential of involving a truncation when you assign the result of ReadStr
to your 80 character short string.