[fpc-pascal] How to declare function with untyped array parameter

LacaK lacak at zoznam.sk
Thu May 26 10:33:23 CEST 2016


Dňa 26.5.2016 o 9:11 Sven Barth napísal(a):
>
> Am 26.05.2016 08:33 schrieb "LacaK" <lacak at zoznam.sk 
> <mailto:lacak at zoznam.sk>>:
> >
> > Hi,
> >
> > is there way how to declare function, which will accept as parameter 
> any array type ?
> > (this parameter I need forward to System.Length() only )
> >
> > Just like Length() function.
> >
> > Now I fall into problem with generics , where I have in one unit 
> generic object, which has Length property (or Length function)
> > This function internally calls System.Length(A)
> >
> > But when I specialize such generic in another unit, I give 
> "Compilation aborted" (FPC 2.6.4)
> [snip]
> > Is there any workaround ?
>
> Test with 3.0.0. Everything before that is vastly inferior regarding 
> generics.
> If it happens there and with 3.1.1 as well then please file a bug report.
>

AFAICS with 3.0 it works
(but I need 2.6.4 for now)
Thanks
-Laco.




More information about the fpc-pascal mailing list