![]() |
#2
风吹过b2013-05-17 17:03
|
把其中代码Static x As Integer修改为DIM x As Integer,再观察结果是否有变化,为什么?
Private Sub Command1_Click()
Static x As Integer
x = 10
y = 5
y = f(x)
Print x; y
End Sub
Public Function f(x As Integer)
Dim y As Integer
x = 20
y = 2
f = x * y
End Function