1.VB中的数组只能按地址传递
2.数组作为形参时,应为 “数组名()” 注意是空括号
3.数组作为实参时,应为 “数组名” 注意不要括号
4.下面是一个通过过程为一个数组赋值的例子,显示了传递数组
Private Sub Form_Click()
Dim a(1 To 3) As Integer
Call Assign(a)
Dim i As Integer
For i = 1 To 3
Print a(i)
Next
End Sub
Private Sub Assign(x() As Integer)
Dim i As Integer
For i = 1 To 3
x(i) = i
Next
End Sub