German C. Basisty wrote:

Now I tryed writting both uses on implementation section and also works well. Whats the diference between uses clause and implementation clause?

both are uses clauses.

The one defined in the interface section tells the compiler which units to use to compile the interface part of a unit (and also the implementation part since the scope is from top to bottom in a unit)

The one defined in the implementation section tells the compiler which units to use to compile the implementation section.

So for code you can resolve circular references this way. For definitions in the interface part not.

Compiling the following excmple doesn't work (in such cases redesign your class and or unit layout):

unit A;

interface

uses
  B;

type
  TA = class
  end;

  TAB = class(TB)
  end;

....

unit B;

interface

uses
  A;

type
  TB = class
  end;

  TBA = class(TA)
  end;

....


Marc

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to