Re: Procedural parameters

Hairy Pixels via fpc-pascal <[email protected]>
Newsgroups gmane.comp.compilers.free-pascal.general
Message-ID <CAGsUGtk7nKrBq8Je6itr2Bk-jwJZVuHh8XgU-Mgyd3+sYxdmdw@mail.gmail.com>
 On Dec 15, 2024 at 6:28:25 PM, Hairy Pixels <[email protected]> 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

_______________________________________________
fpc-pascal maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.