比如有两个单元文件unit1和unit2,unit1要用到unit2里面的函数或过程,同时unit2里面的某些函数或过程需要用到unit1里面的某些控件,我知道unit1和unit2可以互相调用,但不能同时在接口互相调用。那么请问应该怎样调用呢?请具体点说明。谢谢。

解决方案 »

  1.   

    不同时在inteface 中引用就可以了
      

  2.   

    unit1里:implementationuses unit2unit2里:implementationuses unit1
      

  3.   

    在implementation后
    Uses TheUnit;
      

  4.   

    两个窗体互相调用不能同时写在implementation后.应该一个定在interface后的uses中,一个写在
    implementation后的uses中.其格式如下:
    unit unit1
    interface
      uses windows, ..., unit2;
    ....
    end;
    ****************************************
    unit unit2
    interface
      ........
    implementation
      uses unit1.
      

  5.   

    两个窗体互相调用不能同时写在implementation后.
    --------
      你试一下就知道两个窗体
             可以在 implementation 相互引用了
      

  6.   

    implementation
    uses unit2;
    {$R *.dfm}
    要赢得意大利细面条的战争啊
    呵呵
      

  7.   

    同意 insert2003(高级打字员) 和wzg1031(0223) 的意见