Re: [fpc-pascal] Incompatible procedure types

2023-11-08 Thread Sven Barth via fpc-pascal
Hairy Pixels  schrieb am Do., 9. Nov. 2023, 01:37:

>
>
> > On Nov 8, 2023, at 1:50 PM, Sven Barth via fpc-pascal <
> fpc-pascal@lists.freepascal.org> wrote:
> >
> > Please provide example code so that one can look at it. Such messages
> without example are more often than not simply useless.
> >
>
> So this ended up being because I didn't enable the "nestedprocvars" mode
> switch and you get that error assigning to a "is nested" procedure
> variable. This has bitten me so many times. That error message is
> basically worthless to a user and should probably be changed.
>

Still, provide an example, please.

Regards,
Sven

>
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Incompatible procedure types

2023-11-08 Thread Hairy Pixels via fpc-pascal


> On Nov 8, 2023, at 1:50 PM, Sven Barth via fpc-pascal 
>  wrote:
> 
> Please provide example code so that one can look at it. Such messages without 
> example are more often than not simply useless. 
> 

So this ended up being because I didn't enable the "nestedprocvars" mode switch 
and you get that error assigning to a "is nested" procedure variable. This has 
bitten me so many times. That error message is basically worthless to a 
user and should probably be changed.

Regards,
Ryan Joseph

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Incompatible procedure types

2023-11-07 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal  schrieb am
Mi., 8. Nov. 2023, 01:48:

> What does this error mean? It's comparing a pointer to a procedure to a
> procedure variable (a callback). The signature appears exactly the same
> "function(TSymbol;TSymbol):LongInt is nested" so what's the problem?
>
> error: Incompatible type for arg no. 2: Got " function(TSymbol;TSymbol):LongInt is nested;StdCall>", expected
> "TSList$1$crcCC4DE170_crc9A33B934. function(TSymbol;TSymbol):LongInt is nested;StdCall>"
>

Please provide example code so that one can look at it. Such messages
without example are more often than not simply useless.

Regards,
Sven

>
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Incompatible procedure types

2023-11-07 Thread Hairy Pixels via fpc-pascal
What does this error mean? It's comparing a pointer to a procedure to a 
procedure variable (a callback). The signature appears exactly the same 
"function(TSymbol;TSymbol):LongInt is nested" so what's the problem?

error: Incompatible type for arg no. 2: Got "", expected 
"TSList$1$crcCC4DE170_crc9A33B934."

Regards,
Ryan Joseph

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal