> While converting a KOL regular expression unit for use with freepascal, I came
> across only one compile error, in {$mode delphi}
> 
> The error was here:
> const
>   RegExprInvertCaseFunction : 
> TRegExprInvertCaseFunction=TRegExpr.InvertCaseFunction;
> 
> Error: Typed constants of the type "procedure of object" can only be 
> initialized
> with NIL
> 
> The code below seemed to fix the problem, as it compiled ok.
> var
>   RegExprInvertCaseFunction : TRegExprInvertCaseFunction;
> 
> Is the error that I got correct even for delphi compatability? Is it bad code,
> good code?

It's bad code, unless it is a class method.

_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to