Re: [fpc-pascal] identifier scope problem

2010-05-06 Thread leledumbo
I'm unable to reproduce your error. Real code that I could actually compile and run would make this a lot easier. Perhaps you're using an old version of the compiler where TObject doesn't have Equals method (added for Delphi compatibility along with UnitName and ToString) prefixing by the

Re: [fpc-pascal] identifier scope problem

2010-05-04 Thread Thierry Coq
try prefixing by the unit name: procedure tcls.method(x,y: tt); begin if a.equals(x,y) then ... end; Thierry leledumbo wrote: consider the following code snippet: code unit a; interface type tt = ... tcls = class procedure method(x,y: tt); end; function equals(x,y: tt):

[fpc-pascal] identifier scope problem

2010-05-03 Thread leledumbo
consider the following code snippet: code unit a; interface type tt = ... tcls = class procedure method(x,y: tt); end; function equals(x,y: tt): boolean; implementation function equals(x,y: tt): boolean; begin ... end; procedure tcls.method(x,y: tt); begin if equals(x,y) then

Re: [fpc-pascal] identifier scope problem

2010-05-03 Thread David Emerson
On Mon 3 May 2010, leledumbo wrote: In the code above, equals will refer to tobject.equals instead of equals defined in the unit. How can I refer to that one instead? I'm unable to reproduce your error. Real code that I could actually compile and run would make this a lot easier. That said,