<HTML><HEAD>
<META content="text/html; charset=ISO-8859-1" http-equiv=Content-Type></HEAD>
<BODY dir=ltr bgColor=#ffffff text=#000000>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial'; COLOR: #000000">
<DIV>But it can be encapsulated in the anonymous object of anonymous method as
it is done with local (stack) variables already in Delphi.</DIV>
<DIV>Anonymous methods can and do use local variables, and are regularly
returned as result or passed to other threads.</DIV>
<DIV>That is the power of anonymous methods. I covered that in great detail in
my last CodeRage session on functional programming.</DIV>
<DIV> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial'; COLOR: #000000">With best
regards,<BR>Boian
Mitov<BR><BR>-------------------------------------------------------<BR>Mitov
Software<BR>www.mitov.com<BR>-------------------------------------------------------</DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<DIV style="FONT: 10pt tahoma">
<DIV> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=mschnell@lumino.de
href="mailto:mschnell@lumino.de">Michael Schnell</A> </DIV>
<DIV><B>Sent:</B> Monday, September 22, 2014 1:54 AM</DIV>
<DIV><B>To:</B> <A title=fpc-devel@lists.freepascal.org
href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</A>
</DIV>
<DIV><B>Subject:</B> Re: [fpc-devel] Question about Syntax: I there a reason for
this design?</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<DIV class=moz-cite-prefix>On 09/21/2014 06:36 PM, Boian Mitov wrote:<BR></DIV>
<BLOCKQUOTE cite=mid:3143791BB61A48C0A149E8DDF9079B9A@mpc1 type="cite">
<DIV dir=ltr>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial'; COLOR: #000000">
<DIV>I consider it a design bug that local functions can’t be passed as
anonymous methods in Delphi. There is no reason for that not to be done,
except that they did not bother.</DIV>
<DIV> </DIV></DIV></DIV></BLOCKQUOTE>???<BR>Local functions can use local
variables of the outer function. Same are logically undefined outside the outer
function and technically stack based. Hence a local function can't be
passed anywhere.<BR><BR>-Michael<BR>
<P>
<HR>
_______________________________________________<BR>fpc-devel maillist
-
fpc-devel@lists.freepascal.org<BR>http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel<BR></DIV></DIV></DIV></BODY></HTML>