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

Sven Barth pascaldragon at googlemail.com
Thu May 26 09:11:50 CEST 2016


Am 26.05.2016 08:33 schrieb "LacaK" <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.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160526/515997d8/attachment.html>


More information about the fpc-pascal mailing list