有如下程序:
Private Sub Command1_Click()
Dim k As Integer, m As Integer
Dim p As Integer
k=4: m=1
p=PC(k, m) : Print p;
p=PC(k, m) : Print p
End Sub
Private Function PC(a As Integer, b As Integer)
Static m As Integer, i As Integer
m=0: i=2
i=i + m + 1
m=i + a + b
PC=m
End Function
程序运行后,输出的结果为
A) 4 6
B) 6 6
C) 8 8
D) 10 12
求高手详细解释过程,希望通俗易懂,不然偶看不懂。。
谢谢。。