(6)在窗体上有1个名称为Command 1的命令按钮,并有如下事件过程和函数过程:Private Sub Command 1
(6)在窗体上有1个名称为Command 1的命令按钮,并有如下事件过程和函数过程:
Private Sub Command 1_Click()
Dim p As Integer
p=m(1)+m(2)+m(3)
Print p
End Sub
Private Function m(n As Integer) As Integer
Static s As Integer
For k=1 To n
s=s+1
Next
m=s
End Function
运行程序,单击命令按钮Command 1的输出结果为【6】。