[fpc-pascal] Delphi mode

Jonas Maebe jonas.maebe at elis.ugent.be
Thu Feb 2 16:15:05 CET 2006


On 2 feb 2006, at 16:10, Carsten Bager wrote:

> Why do I have to use the {$MODE Delphi} directive to compile this,
> It compiles in TP 6

You can also use {$mode tp} (and you should if you are compiling TP  
code).

> -------------
> Type
>   tFun=function:boolean;
>
> Procedure g(f:tFun);
> Begin
>  if f then exit;
> End;
> ------------------

You have to use "if f() then exit;" in FPC (the default) and OBJFPC  
mode.


Jonas




More information about the fpc-pascal mailing list