Am 19.10.2011 10:16, schrieb Sven Barth:
I would prefer a style like
myfunc := @function(x, y: Integer): Integer Result := x + y;
And how would you create more complex functions? In Pascal code blocks
are started with "begin" and ended with "end". I don't see a reason why
anonymous methods should differ here.
Allow both, like it is already allowed in Pascal:
if True then DoSomething;
if True then begin
DoSomething;
DoSomethingMore;
Etc;
end;
If a function only contains one statement it is not a codeblock.
Michael
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal