⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1419.html

📁 VB技巧问答10000例 VB技巧问答10000例
💻 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 27, 1997 at 19:32:48:<p>
If we define two variables in vb6.0 as follows<p>dim vara(),varb() as byte 'other types also introduce same problem<p>and there are one function or procedure which defined as<br>public sub sub_a(...,vara() as byte,varb() as byte,...)<br>end sub<p>My problem is that after i call the function or procedure (for example, call sub_a(...,vera,verb,...)) why the compiler tell me the error message, "type mismtach: array or user-defined type expected", in the location of vara(). But, the problem can be sloved by the following defintion<br>dim vara() as byte<br>dim varb() as byte<p>For one words,<br>1. dim vara(), varb() as byte<br>2. public sub sub_a(...,vera() as byte ,verb() as byte,...)<br>3. call sub_a(...,vera,verb,...)<br>will get an error message, but<br>1. dim vera() as byte: dim verb() as byte<br>2. public sub sub_a(...,vera() as byte ,verb() as byte,...)<br>3. call sub_a(...,vera,verb,...)<br>will work!!<p>Can anyone tell me why is the problem happened?<p>Thank you in advance<p>Wen-Gou Lin
<br>
<p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 1419-->
<!--top: 1420--><li><a href="1420.html"><b>宣告方式错误</b></a> 小吴 <i>20:18:12 11/27/97</i>
(<!--responses: 1420-->0)
<ul><!--insert: 1420-->
</ul><!--end: 1420-->
</ul><!--end: 1419-->
<br><HR><p>

</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -