如:
unit1.pas
  public
    tempstr: string;在 unit2.pas 里怎么调用unit1.pas里的tempstr: string????

解决方案 »

  1.   

    1、首先在unit2中uses unit1;
    2、在unit2中定义tmpClassName:TClassName;(TClassName为你unit1中的类名);
    3、tmpClass.tempstr;(在unit2中就可以这样使用了);嘿嘿,接分!
      

  2.   

    回yanghuafeng(锋),已经定义.如下,但无任何返回值.
    procedure TTestAsp.typeok;
    var
    testtype: TACCN;
    begin
      testtype := TACCN.Create;
      Response.Write ('<br>-------2------<br>');
      Response.Write (testtype.GetTypeStr);
      testtype.Free;
    end;
    帮助更多需要帮助的人,我等待着您的帮助!
      

  3.   

    多谢各位,问题已经在http://www.delphibbs.com得到解决!