vb6数组参数传递:VB中如何将数组作为参数传递
发布网友
发布时间:2023-09-14 23:22
我来回答
共1个回答
热心网友
时间:2024-12-02 09:33
vb6中所有数组做参数传递都是传地址的。
Private Sub Command1_Click()
Dim a(3) As Integer
a(0) = 1
a(1) = 2
a(2) = 3
a(3) = 4
arr a
End Sub
Private Sub arr(ByRef arr() As Integer)
Dim i As Integer
For i = 0 To UBound(arr)
Print arr(i);
Next
Print
End Sub