Carsten Bager wrote:
Why do I have to use the {$MODE Delphi} directive to compile this,
It compiles in TP 6
-------------
Type
tFun=function:boolean;
Procedure g(f:tFun);
Begin
if f then exit;
End;
------------------
Because f is a function variable and not the result. In Delphi it can
mean two things (and I wonder what happens if the result of a function
is a tFun :-)).
If you want to call f, use this:
if f() then exit;
Vincent.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal