[fpc-pascal] PChar & AnsiString

spir denis.spir at gmail.com
Tue Jun 1 20:20:35 CEST 2010


On Tue, 01 Jun 2010 16:30:22 +0100
Martin <fpc at mfriebe.de> wrote:

> I don't know all the internals of FPC, but yes to my understanding, your 
> quote:
>    "parameter passing is just an implicit assignment"
> is absolutely true.
> 
> So why do you then say "copy on write" would not apply?
> The assignment creates a 2nd reference, and a copy only happens if 
> inside Foo a change is made to the string.

You're right, I reasoned wrongly.

Deins
________________________________

vit esse estrany ☣

spir.wikidot.com



More information about the fpc-pascal mailing list