[fpc-pascal] How can I implement "thrice" in Free Pascal?
Sven Barth
pascaldragon at googlemail.com
Wed Oct 19 10:49:57 CEST 2011
Am 19.10.2011 10:27, schrieb Jonas Maebe:
>
> On 19 Oct 2011, at 09:59, Marco van de Voort wrote:
>
>> In our previous episode, Sven Barth said:
>>>> This implementation will result in crashes if T is a
>>>> reference-counted type.
>>>
>>> Right... I tend to forget about these... what would the correct way to
>>> copy an array of ref counted types? E.g. an "array of string"?
>
> For-loops.
*sigh*
For-loops it is then...
>> copy () ? :-)
>
> copy() cannot be used to concatenate two arrays, because it is a
> function that returns a new array with contantes of (a potentially
> sub-array of) the original array.
That's what I remembered about "copy" as well.
Regards,
Sven
More information about the fpc-pascal
mailing list