?? 1313.html
字號:
<html> <head> <title>如何宣告自定形態變數為全域變數?</title> </head> <BODY BACKGROUND="" BGCOLOR="white" TEXT="black" LINK="blue" VLINK="#808080" ALINK="red"> <center> <h1>如何宣告自定形態變數為全域變數?</h1> </center><HR><p>Posted by <a href="mailto:lwg@ss20-1.tatung.com.tw">林文國</a> on November 18, 1997 at 03:35:53:<p>If I defined a user-defined type as<p>type ex_type<br> varA as integer<br> varB() as double<br>end type<p>Thus, we can define a variable C whose type is ex_type as <p>dim varC as ex_type<p>Now, my problem is how can I claim varC as a global variable. Assume there are one form and 3 modules in a project. They have filename as form.frm, a.bas, b.bas and c.bas, respectively. Each one<br>have some functions or procedures. My problem is that is it possible <br>that varC can be used in all form and modules?<br>I tried to define varC as global in a.bas, but it failed to be recognized in b.bas, c.bas and form,frm. That is to say, In a.bas, I define<p>golbal varC as ex_type<p>but b.bas can't recognie what is varC.varA.<p>Is it possible to define varC as a global variable?<br>Thank you very much....<br><p><a name="followups">Follow Ups:</a><br><ul><!--insert: 1313--><!--top: 1315--><li><a href="1315.html"><b>當然可以!</b></a> 小吳 <i>16:47:47 11/18/97</i>(<!--responses: 1315-->0)<ul><!--insert: 1315--></ul><!--end: 1315--></ul><!--end: 1313--><br><HR><p></body></html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -