mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 08:18:12 +02:00
29 lines
325 B
ObjectPascal
29 lines
325 B
ObjectPascal
{ %NORUN }
|
|
|
|
program tw39736;
|
|
|
|
{$mode objfpc}{$H+}
|
|
{$ModeSwitch functionreferences}
|
|
{$ModeSwitch anonymousfunctions}
|
|
|
|
{$warn 5028 error}
|
|
|
|
type
|
|
TProc = reference to procedure;
|
|
|
|
var
|
|
p: TProc;
|
|
procedure Fly(w: word);
|
|
begin
|
|
p:=procedure
|
|
begin
|
|
writeln('TBird.Fly w=',w);
|
|
end;
|
|
p();
|
|
end;
|
|
|
|
begin
|
|
Fly(3);
|
|
end.
|
|
|