If I have a unit that is filled with constants like...
unit AConsts;
interface
const
Const1 : WideString = 'Const1';
Const2 : WideString = 'Const2';
Const3 : WideString = 'Const3';
Const4 = 100;
Const5 = 100;
implementation
end.
and I want to use this unit from another unit, is there any difference between...
unit AUnit;
interface
uses
AConsts;
Implementation
end.
and
unit AUnit;
interface
implementation
uses
AConsts;
end.
?
The question is not about scope, avoiding circular references etc. It is about differences in the compiled application.
If UnitA
, UnitB
and UnitC
all use AConsts
, would there be a difference in the compiled application (assuming no name clashes between the constants in the AConsts
unit and other code) between App1
where these UnitA
, UnitB
and UnitC
all have AConsts
in the interface section and App2
where UnitA
, UnitB
and UnitC
all have AConsts
in the implementation section.