快过节了,首先祝福大家在新的一年里更进一步.
一般我做程序是把用到的单元文件名放在"实现"中,今天发现有的代码把他放到"接口"中,我也放上发现没出什么错误.
但是不明白二者的区别.
一般我做程序是把用到的单元文件名放在"实现"中,今天发现有的代码把他放到"接口"中,我也放上发现没出什么错误.
但是不明白二者的区别.
解决方案 »
- 程序自我刪除我問題
- 用quickrep 自定义纸张打印的问题?
- delphi中 如何备份数据库为access或dbf
- 讨论,delphi+win98和delphi+win2000的不同
- 如何及时在数据感知组件看到被修改过的数据,在线等
- 如何用delphi调用飞信WebService接口实现短信发送
- createoleobject函数不可以在dll里调用?(来者有分)
- treeview怎样使被选中的父节点的子节点也全部被选中?
- 用DELPHI怎么执行“每天自动压缩指定目录下的文件到指定目录”
- 在对table执行insertrecord时提示 'index is read only'怎么办,一定要拉一把.我是新手.
- 刚从vb转过来,问个不是问题的问题,^符号在delphi中表示什么意思?我的书没介绍,一直搞不明白
- CxGrid中的自动滚屏问题,急!!
interface
uses Unit2;
...
unit Unit2;
interface
uses Unit1;
...However, the two units can legally reference each other if one of the references is moved to the implementation section:unit Unit1;
interface
uses Unit2;
...
unit Unit2;
interface
...
implementation
uses Unit1;
...To reduce the chance of circular references, it's a good idea to list units in the implementation uses clause whenever possible. Only when identifiers from another unit are used in the interface section is it necessary to list that unit in the interface uses clause.其实,简单的说,大概地,可以这样理解,
放在interface的,可以被其他的看见
而放在implementation的,使这个单元私有的,其他单元不可见
这个就类似于面向对象思想里面的public变量和private变量的区别。