[fpc-pascal] identifier scope problem

leledumbo leledumbo_cool at yahoo.co.id
Tue May 4 06:50:31 CEST 2010


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
    ...
end;

end.
</code>

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?

-- 
View this message in context: http://old.nabble.com/identifier-scope-problem-tp28443031p28443031.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.




More information about the fpc-pascal mailing list