Re: [fpc-pascal] Class procedural type

2012-12-18 Thread Ewald
Once upon a time, on 12/18/2012 06:42 AM to be precise, Sven Barth said: Am 17.12.2012 22:27 schrieb Ewald ew...@yellowcouch.org mailto:ew...@yellowcouch.org: It should not contain this hidden parameter? In that case the above code (with the intermediate pointer cast) would prove correct?

[fpc-pascal] Class procedural type

2012-12-17 Thread Ewald
Hello, Is there any way to define the appropriate type for `AMethod` (in mode ObjFPC)? TTestClass = Class Public Class Procedure AMethod; End; I tried Type TSomeType = Class Procedure; But this didn't work. Rather obvious of course since this could also be interpreted

Re: [fpc-pascal] Class procedural type

2012-12-17 Thread Sven Barth
On 17.12.2012 17:39, Ewald wrote: Hello, Is there any way to define the appropriate type for `AMethod` (in mode ObjFPC)? TTestClass = Class Public Class Procedure AMethod; End; I tried Type TSomeType = Class Procedure; But this didn't work. Rather obvious of

Re: [fpc-pascal] Class procedural type

2012-12-17 Thread Ewald
On 17 Dec 2012, at 20:04, Sven Barth wrote: There is no real solution for this. I already thought so, I thank you for clearing this matter up to me. Any ideas? BTW: For time being I fixed it through TProcType(Pointer(@TTestClass.AMethod)), where `TProcType = Procedure;`. I think

Re: [fpc-pascal] Class procedural type

2012-12-17 Thread Paul Ishenin
18.12.12, 5:26, Ewald пишет: Suppose TTestClass contains `AField: Integer; static;`, then the following would be right if I understand you correctly? Class Procedure TTestClass.AMethod; static; // I don't know if `static` should be in the implementation as well, but I'll soon figure out :-)

Re: [fpc-pascal] Class procedural type

2012-12-17 Thread Sven Barth
Am 17.12.2012 22:27 schrieb Ewald ew...@yellowcouch.org: On 17 Dec 2012, at 20:04, Sven Barth wrote: There is no real solution for this. I already thought so, I thank you for clearing this matter up to me. Any ideas? BTW: For time being I fixed it through