[fpc-pascal] Generic specialization using $mode objfpc
silvioprog
silvioprog at gmail.com
Fri Oct 31 04:07:20 CET 2014
On Fri, Oct 31, 2014 at 12:01 AM, Kiên Nguyễn Tiến Trung <kc97ble at gmail.com>
wrote:
> AFAIK, you must create a new type:
>
> type
> TMyGenericInt = specialize TMyGeneric<Integer>;
> var
> VMyGenericInt: TMyGenericInt;
>
> begin
> VMyGenericInt:= TMyGenericInt.Create;
> VMyGenericInt.Value := 2014;
> VMyGenericInt.Free;
> end.
>
Hm... so I'll choose the mode delphi in my new projects to type less code
hehe...
Thanks guy! =)
--
Silvio Clécio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20141031/d2998665/attachment.html>
More information about the fpc-pascal
mailing list