vb中a((i),j)中(i)是什么意思 为什么要加个括号?
OptionExplicitPrivateSubform_click()DimIAsInteger,jAsIntegerI=1:j=2Calltest(I,j)Print...
Option Explicit
Private Sub form_click()
Dim I As Integer, j As Integer
I = 1: j = 2
Call test(I, j)
Print I, j
Call test(I, j)
Print I, j
End Sub
Private Sub test(m As Integer, n As Integer)
Static sta As Integer
m = m + n
n = n + m + sta
sta = sta + m
End Sub
这个的答案是 3 5
8 16
但是 如果 i加了括号后,答案就变了 是 1 5
6 14 展开
Private Sub form_click()
Dim I As Integer, j As Integer
I = 1: j = 2
Call test(I, j)
Print I, j
Call test(I, j)
Print I, j
End Sub
Private Sub test(m As Integer, n As Integer)
Static sta As Integer
m = m + n
n = n + m + sta
sta = sta + m
End Sub
这个的答案是 3 5
8 16
但是 如果 i加了括号后,答案就变了 是 1 5
6 14 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询