Am 08.02.2015 22:08 schrieb "Maciej Izak" <[email protected]>:
> To achieve this I need to create new special record operators:
>
> ====== code begin ======
> {$MODESWITCH MANAGEMENTOPERATORS}
>
>   TValue = record
>     ...
>     class operator Initialize(Data, TypeInfo: Pointer): pointer;
>     class operator Finalize(Data, TypeInfo: Pointer): pointer;
>     class operator Copy(Source, Dest, TypeInfo: Pointer): pointer;
>   end;
> ====== code end ======

This is /really/ bad design. If you want such operators they would need to
be defined like this:

  TValue = record
    ...
    class operator Initialize(var aRec: TValue);
   class operator Finalize(var aRec: TValue);
    class operator Copy(constref aSource: TValue; var aDest: TValue);
  end;
====== code end ======

Regards,
Sven
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to