编写DLL时多个unit能调用全局变量吗? 如:unit1.pas public tempstr: string;在 unit2.pas 里怎么调用unit1.pas里的tempstr: string???? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 1、首先在unit2中uses unit1;2、在unit2中定义tmpClassName:TClassName;(TClassName为你unit1中的类名);3、tmpClass.tempstr;(在unit2中就可以这样使用了);嘿嘿,接分! 回yanghuafeng(锋),已经定义.如下,但无任何返回值.procedure TTestAsp.typeok;vartesttype: TACCN;begin testtype := TACCN.Create; Response.Write ('<br>-------2------<br>'); Response.Write (testtype.GetTypeStr); testtype.Free;end;帮助更多需要帮助的人,我等待着您的帮助! 多谢各位,问题已经在http://www.delphibbs.com得到解决! 数据模块在哪里create好? 求助,向各为前辈 请教几个 fastreport 问题,谢谢! 变量调用的问题(在线) 关于DLL的问题!请高手帮忙,高分相送! dll库传参的问题 用delphi+sql server 写一个支持WEB查询的三层结构的货运管理系统需要多少人年?` 主从报表? 我真的期待DELPHI击败其他的开发工具,特别是微软的! 请问如何用DBEDIT显示被查询出来的某一记录的某一字段?谢了! 各位大哥那有Ado补丁的下载网址 fastreport中的momo显示格式问题 拖动消息
2、在unit2中定义tmpClassName:TClassName;(TClassName为你unit1中的类名);
3、tmpClass.tempstr;(在unit2中就可以这样使用了);嘿嘿,接分!
procedure TTestAsp.typeok;
var
testtype: TACCN;
begin
testtype := TACCN.Create;
Response.Write ('<br>-------2------<br>');
Response.Write (testtype.GetTypeStr);
testtype.Free;
end;
帮助更多需要帮助的人,我等待着您的帮助!