> On Feb 16, 2022, at 2:46 AM, Sven Barth via fpc-pascal > <fpc-pascal@lists.freepascal.org> wrote: > > // nested function/procedure/routine variable > type > TFoobarNested = function: LongInt is nested; > > var > f: TFoobarFuncRef; > begin > // anonymous function/procedure/routine > f := function: LongInt > begin > end; > end;
"However assigning a nested function variable to a function reference is much harder. Assigning a function reference to a nested function variable is hard as well. " This means if you expanded your example with: var n: TFoobarNested; begin f := n; THAT would be hard? I've never passed around nested function vars before so I don't really know the limitations of this. The important thing is the primary use case works. Regards, Ryan Joseph _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal