关于VB小程序的过程问题
第一个程序为什么运行不了?PrivateSubCommand1_Click()Dima,bAsInteger,c1,c2,i,j,k1,k2AsIntegera=3b=4...
第一个程序为什么运行不了?
Private Sub Command1_Click()
Dim a, b As Integer, c1, c2, i, j, k1, k2 As Integer
a = 3
b = 4
Call Mysub(a, b, c1, c2)
Print c1, c2
i = 2
j = 4
Mysub i, j, k1, k2
Print k1, k2
End Sub
Sub Mysub(x As Integer, y As Integer, z1 As Integer, z2 As Integer)
z1 = x * x + y * y
z2 = x * x - y * y
End Sub
第二个程序为什么又可以?
Private Sub Command1_Click()
Dim a, b, c As Integer
a = 18
Print a
Call m(a, b, c)
Print a, b, c
End Sub
Public Sub m(x, y, z As Integer)
y = x + x
z = x + y
End Sub 展开
Private Sub Command1_Click()
Dim a, b As Integer, c1, c2, i, j, k1, k2 As Integer
a = 3
b = 4
Call Mysub(a, b, c1, c2)
Print c1, c2
i = 2
j = 4
Mysub i, j, k1, k2
Print k1, k2
End Sub
Sub Mysub(x As Integer, y As Integer, z1 As Integer, z2 As Integer)
z1 = x * x + y * y
z2 = x * x - y * y
End Sub
第二个程序为什么又可以?
Private Sub Command1_Click()
Dim a, b, c As Integer
a = 18
Print a
Call m(a, b, c)
Print a, b, c
End Sub
Public Sub m(x, y, z As Integer)
y = x + x
z = x + y
End Sub 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询