[fpc-pascal] Caller agnostic procedure variables

Sven Barth pascaldragon at googlemail.com
Tue Feb 15 14:26:14 CET 2022


Ryan Joseph via fpc-pascal <fpc-pascal at lists.freepascal.org> schrieb am
Di., 15. Feb. 2022, 13:06:

>
>
> > On Feb 15, 2022, at 3:32 PM, Michael Van Canneyt via fpc-pascal <
> fpc-pascal at lists.freepascal.org> wrote:
> >
> > I requested that this:
> >
> > procedure TMyObject.Demo;
> >
> >  Procedure DoSub;
> >  begin
> >    Writeln('Sub');
> >  end;
> >
> > begin
> >  DoTest(DoSub);
> > end;
>
> So that means "reference to procedure" is not compatible with "is nested"?
>

It's relatively "easy" to implement assigning a nested function to function
references. 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.

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20220215/e52734f6/attachment.htm>


More information about the fpc-pascal mailing list