On 29 jul 2004, at 06:33, Marc Santhoff wrote:

according to the manual AnsiStrings are 'copied on change'.

Correct.

Can the compiler be forced to copy on duplication?

No, but the RTL can be:

Procedure UniqueString(Var S : AnsiString);

This procedure will make variable S point to an ansistring with the same contents as the current one, but with reference count 1 (so it will generate a copy if necessary).


Jonas


_______________________________________________ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to