[fpc-devel] Incompatible Types: got "untyped" expected "<procedure variable type of procedure(Pointer);Register>
Mattias Gaertner
nc-gaertnma at netcologne.de
Wed Jul 16 22:21:40 CEST 2008
On Wed, 16 Jul 2008 15:05:44 -0500
Sean McIlwain <sean at scootersoftware.com> wrote:
> I'm getting a Error: Incompatible Types: got "untyped" expected
> "<procedure variable type of procedure(Pointer);Register> when
> compiling the following code. This happens when using default
> parameter values.
>
>
> Here is an example:
>
>
> var Callback: procedure(Data: Pointer);
>
> procedure Proc(AData: Pointer = nil);
> begin
> end;
>
> initialization
> Callback := Proc;
>
> If the = nil is removed, then the code compiles.
Use mode objfpc and CallBack:=@Proc.
Mattias
More information about the fpc-devel
mailing list