[fpc-pascal] Better way to handle callback types

Michael Van Canneyt michael at freepascal.org
Sat Aug 21 23:09:18 CEST 2021



On Sat, 21 Aug 2021, Ryan Joseph via fpc-pascal wrote:

>
>
>> On Aug 21, 2021, at 1:30 PM, Michael Van Canneyt <michael at freepascal.org> wrote:
>> 
>> "Reference to" can be used for the others as well.
>
> How do you mean?  Reference to is currently only available for cblocks on macOS I think so I'm not sure how this would look.

As in Delphi 'reference to' will also be used for all references where an
anonymous functon can be used. But you can perfectly use methods and local
functions for that. So it will function a like a catch-all procedural type.

When Sven is done with the anonymous methods, you'll see it in action.

Michael.


More information about the fpc-pascal mailing list