[fpc-pascal] Delphi mode
    Vincent Snijders 
    vsnijders at quicknet.nl
       
    Thu Feb  2 16:15:49 CET 2006
    
    
  
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.
    
    
More information about the fpc-pascal
mailing list