[fpc-pascal] generic proc inference
Ryan Joseph
genericptr at gmail.com
Mon Oct 7 00:19:37 CEST 2019
> On Oct 6, 2019, at 5:42 PM, Mattias Gaertner via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
>
> I meant:
>
> generic procedure DoThis<T>(param1: T; param2: word = 100);
> begin
> end;
That works then. Added a test:
{$mode objfpc}
{$modeswitch implicitfunctionspecialization}
program timpfuncspez15;
generic procedure DoThis<T>(param1: T; param2: integer = 100);
begin
writeln(param1, ' = ', param2);
end;
begin
DoThis('hello');
end.
Regards,
Ryan Joseph
More information about the fpc-pascal
mailing list