fpc/tests/webtbs/tw15446.pp
2010-01-02 21:43:19 +00:00

27 lines
390 B
ObjectPascal

program varfunc_test;
{$IFDEF FPC}
{$mode Delphi}
{$ELSE}
{$APPTYPE CONSOLE}
{$ENDIF}
{$H+}
uses sysutils;
function TestFunc1 : Longint;
begin
Result := 100;
end;
Type Tfunc1 = function : Longint;
var
TestFunc2 : Tfunc1 = TestFunc1;
begin
writeln({$IFDEF FPC}'FPC'{$ELSE}'Delphi'{$ENDIF});
writeln( Format('%d',[TestFunc1]) );
writeln( Format('%d',[TestFunc2]) );
end.