[fpc-pascal] How can I implement "thrice" in Free Pascal?

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Oct 19 10:27:47 CEST 2011


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.

> 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.


Jonas




More information about the fpc-pascal mailing list