[fpc-pascal] Procedural parameters
Hairy Pixels
genericptr at gmail.com
Sun Dec 15 13:11:59 CET 2024
On Dec 15, 2024 at 6:28:25 PM, Hairy Pixels <genericptr at gmail.com> wrote:
> Also noteworthy is ISO standard can accommodate generics which Borland’s
> design can not.
Wait, I’m wrong on this, you can use generic proc types. The problem with
generics are pointers to T. For example that below is not possible.
type
generic TFindNodeComparator<T> = function(item: ^T): Boolean;
generic function FindNode<T>(func: specialize TFindNodeComparator<T>): ^T;
Regards,
Ryan Joseph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20241215/8a25307c/attachment.htm>
More information about the fpc-pascal
mailing list