[填空题] 窗体上有名称为Command1的命令按钮事件过程及2个函数过程如下: Private Sub Command1_Click() Dim x As Integer,y As Integ

13 查阅

[填空题] 窗体上有名称为Command1的命令按钮事件过程及2个函数过程如下:

Private Sub Command1_Click()

Dim x As Integer,y As Integer,z

x=3

y=5

z=fy(y)

Print fx(fx(x)),y

End Sub

Function fx(ByVal a As Integer)

a=a+a

fx=a

End Function

fy=a

Function fy(ByRef a As Integer)

a=a+a

fy=a

End Function

运行程序,并单击命令按钮,则窗体上显示的2个值依次是______和______。

参考答案:

12 10

本题考查了参数传递的传值与传地址的区别。

计算机考试