小问题:放在interface 下uses 里面的项目 ,跟放implementation 下uses里的有什么区别?(50分)

V

vericky

Unregistered / Unconfirmed
GUEST, unregistred user!
interface 下uses 是对外单元公开的,
放implementation 下uses是私有的
 
有区别的,
在implementation 引用的Unit,是不能在引用它的Unit中的 interface 中调用的。
假如你在Unit2里定义了一种类型(如类),如果在Unit1的interface中Uses了它,
就可以在Unit1的interface中使用了,否则只能在implementation中使用。
 
从效果上讲,在implementation中uses可以避免循环引用问题。
 
简单说,系统的单元放在interface's uses,自己写的单元放在implementation's uses下,
否则容易导致重复uses
 
Kylix㊣说的更实际一点
 
longwx说的也不错
 
都是那两个区别了.
 
多人接受答案了。
 
顶部