[fpc-pascal] cloning data containers

Bart bartjunk64 at gmail.com
Sat Dec 27 16:45:46 CET 2014


On 12/27/14, Marc Santhoff <M.Santhoff at web.de> wrote:

> function clone(data_in: a_record): a_record;
> var
>   data: Pa_record;
> begin
>   new(data);
     data^ := data_in;  //should work*
> end;

* Might not be a good idea if data contains a class(reference).

Bart



More information about the fpc-pascal mailing list