[fpc-pascal] [OT] Is "reference to procedure" implemented in trunk?
silvioprog
silvioprog at gmail.com
Mon Oct 20 22:23:06 CEST 2014
On Mon, Oct 20, 2014 at 6:01 PM, Joost van der Sluis <joost at cnoc.nl> wrote:
> On 10/20/2014 08:35 PM, silvioprog wrote:
>
>> Can I use something like this using FPC from trunk?:
>>
>> http://www.drbob42.com/examines/examinA5.htm
>>
>
> Why don't you just try it yourself?
>
Unfortunatelly in the moment I have no a FPC from trunk, I will install it
as soon as possible.
> And there are quite some techniques in that article. which one do you
> mean? Maybe if you take some more time to formulate your real question?
>
The doubt shown in the title: "Is "reference to procedure" implemented in
trunk?". Eg:
TProc = *reference to* procedure(x: Integer);
procedure call(const proc: TProc);
begin
proc(42);
end;
var
proc: TProc;
begin
proc := procedure(a: Integer)
begin
Button1.Caption := IntToStr(a)
end;
call(proc)
end;
The article mentions anonymous functions, which are not supported ...
Thanks, it answers my question! ;)
For a moment I thought something like this was implemented, then I would
test it.
> ... but are also useless.
>
OK, thanks again!
--
Silvio Clécio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20141020/db30e534/attachment.html>
More information about the fpc-pascal
mailing list