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

Sven Barth pascaldragon at googlemail.com
Thu May 26 10:23:59 CEST 2016


Am 26.05.2016 09:39 schrieb "Marco van de Voort" <marcov at stack.nl>:
>
> In our previous episode, LacaK said:
> > is there way how to declare function, which will accept as parameter any
> > array type ?
> > (this parameter I need forward to System.Length() only )
>
> Generally one uses TArray<T> as parametertype. in such cases. One can take
> the length of a generic array.

In that specific case that might not really help except if one puts the
code into a class function of another generic class that does not have a
Length method or property. But even then it might still fail cause of
insufficient support in 2.6.4.

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


More information about the fpc-pascal mailing list