> On Feb 15, 2022, at 2:09 PM, Michael Van Canneyt via fpc-pascal > <fpc-pascal@lists.freepascal.org> wrote: > > I've answered this question before: > > The "Reference to procedure" that will be part of anonymous functionswill do > this for you.
I'm sorry I forgot! This thing keeps coming up for me and driving me nuts but I knew I asked in passing before. So "reference to procedure" are going to be the new standard? To extend my example it would look like this? I please remind me, is there a closure involved which is capturing state and adding overhead? I'm curious what this type actually is also, maybe a dispatch table which wraps the existing types or is it something totally new? ==================== type TMyAction = reference to procedure; procedure DoThis(action: TMyAction); begin action(); end; Regards, Ryan Joseph _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal