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

Marco van de Voort marcov at stack.nl
Wed Oct 19 10:52:20 CEST 2011


In our previous episode, Sven Barth said:
> >>
> >> 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"?
> >
> > copy () ? :-)
> 
> I thought about "copy", too, but how would you implement a generic 
> "concat" using "copy" (or even just an "array of String" one)?

(as said I only reacted on the other bit).

Not without creating a compiler magic function that does it for a refcounted
types as opposite to slice(). But then you start down a slippery slope
trying to create a list based language, and LISP already has been invented
:-)



More information about the fpc-pascal mailing list