[fpc-pascal] Suggestion about ability to pass local procedures as variables

Max Vlasov max.vlasov at gmail.com
Tue Nov 30 10:43:05 CET 2010


On Tue, Nov 30, 2010 at 12:26 PM, Vincent Snijders <
vincent.snijders at gmail.com> wrote:

> 2010/11/30 Max Vlasov <max.vlasov at gmail.com>:
> > Hi,
> >
> > it appears recently several pieces if knowledge came to me, I understood
> how
> > anonymous functions (aka closures) work :) and the fact that GNU Pascal
> > allows passing local procedure as variables. I mentioned them together
> > because as many I don't like the closures as they implemented everywhere
> > including delphi (I read also the discussion here that was several month
> > ago) and on the other side, I feel that allowing passing local procedures
> > (if it's technically possible) is a better way to achieve the same. I
> mean,
> > this will allow to catch local context for executing anything from
> external
> > code (what's actually closures is about).
> >
> > So, I suppose that implementing closures is not in real plans (it's ok, I
> > can live with that), but what about the second, is it possible?
> >
> > I will glad to hear different opinions from the developers
> >
>
> Nested procedural variables are a new feature in fpc 2.5.1. See:
> http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=rev&revision=15656
>
> I don't know if that is what you are asking for.
>
> Vincent
>


Vincent, looks like this is it. I will try to set how it works.  Thanks

Max
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20101130/31f29cf9/attachment.html>


More information about the fpc-pascal mailing list