[fpc-pascal] Unicodestrings and Assign(File)

Sven Barth pascaldragon at googlemail.com
Mon May 21 08:57:34 CEST 2012

Am 21.05.2012 07:17 schrieb "Jürgen Hestermann" <juergen.hestermann at gmx.de>:
> Tomas Hajny schrieb:
>> On Sun, May 20, 2012 14:40, Jürgen Hestermann wrote:
>>> Move(s[1],TextRec(t).Name,Length(s));
>>> That would be a bug IMO when S is longer than 255 characters.
>>> "Move" does no range check.
>> No, unit System (which uses these include files) is never compiled with
> Ok. If that can be guaranteed.
> But I am always wondering why in such situations the type is not set to
> Why use generic String type if all code relies on the fact that it may
never change
> from ShortString to some other string type? It's just asking for trouble
and also
> makes the code less clear.

Estimated guess: the code is from a time where "String = AnsiString" wasn't

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20120521/68fdb6ad/attachment.html>

More information about the fpc-pascal mailing list