<div dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">Ondrej Pokorny via fpc-pascal <<a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>> schrieb am So., 11. Sep. 2022, 15:29:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div>Am 11.09.2022 um 14:22 schrieb Sven
Barth via fpc-pascal:<br>
</div>
<blockquote type="cite">
<div dir="auto">
<div>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Ondrej Pokorny via
fpc-pascal <<a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank" rel="noreferrer">fpc-pascal@lists.freepascal.org</a>>
schrieb am So., 11. Sep. 2022, 12:18:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Shouldn't
this assignment be forbidden?
<div>
<pre>type
TProc = procedure is nested;
function TestNested: TProc;
begin
result := procedure // why is this possible?
begin
writeln(data);
end;
It is not a nested function but an anonymous one.</pre>
</div>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">And? An anonymous function is assignment
compatible to multiple left sides depending on what it
captures. See my announcement mail.</div>
</div>
</blockquote>
<p>Thank you Sven - I missed this info in your email.</p></div></blockquote></div><div dir="auto">It's an extension I had done compared to Delphi so that anonymous functions are also usable without function references which are a bit more heavy weight after all. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div>