Re: [fpc-pascal] Surprise. Comparison of method is only done on the routine address

2016-07-12 Thread Michael Van Canneyt
On Tue, 12 Jul 2016, Dennis Poon wrote: Michael Van Canneyt wrote: On Tue, 12 Jul 2016, Dennis wrote: I always thought comparison of methods is done on both the data and the code part. TMethod = record Code : CodePointer; Data : Pointer; end; But the followi

Re: [fpc-pascal] Surprise. Comparison of method is only done on the routine address

2016-07-12 Thread Dennis Poon
Michael Van Canneyt wrote: On Tue, 12 Jul 2016, Dennis wrote: I always thought comparison of methods is done on both the data and the code part. TMethod = record Code : CodePointer; Data : Pointer; end; But the following proves it is NOT. What is the rationale b

Re: [fpc-pascal] Surprise. Comparison of method is only done on the routine address

2016-07-12 Thread Michael Van Canneyt
On Tue, 12 Jul 2016, Dennis wrote: I always thought comparison of methods is done on both the data and the code part. TMethod = record Code : CodePointer; Data : Pointer; end; But the following proves it is NOT. What is the rationale behind such behavior? AFAIK:

[fpc-pascal] Surprise. Comparison of method is only done on the routine address

2016-07-11 Thread Dennis
I always thought comparison of methods is done on both the data and the code part. TMethod = record Code : CodePointer; Data : Pointer; end; But the following proves it is NOT. What is the rationale behind such behavior? -- program compare_events; {$mo