Difference between adding a unit to the interface or the implementation section

后端 未结 5 1973
眼角桃花
眼角桃花 2020-12-10 18:06

If I have a unit that is filled with constants like...

unit AConsts;
interface
const
   Const1 : WideString = \'Const1\';
   Const2 : WideString = \'Const2\'         


        
5条回答
  •  被撕碎了的回忆
    2020-12-10 18:29

    I put all references in the implementation section and only put those unit names in the interface that I have to.

    I like to limit the scope of everything as much as possible, though, and this policy is pursuant to that.

提交回复
热议问题