[fpc-pascal] Delphi mode

Carsten Bager carsten at beas.dk
Thu Feb 2 16:10:27 CET 2006


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;
------------------
I ask because when I am in Delphi mode this can not compile

Var
  tekster:Tekster_typ; external name 'tekster';


Free Pascal Compiler version 2.0.2 [2005/12/16] for arm
Copyright (c) 1993-2005 by Florian Klaempfl
Target OS: Linux for ARM
Compiling led.pas
Compiling Menu.pas
Menu.pas(41,5) Error: Boolean expression expected, but got "<procedure 
variable type of function:Boolean;StdCall>"

Regards

Carsten



More information about the fpc-pascal mailing list