下列过程定义语句中,形参个数为不确定数量的过程是A.Pnvate Sub Pr03(x As Double,y As Single)B.Pdrate Sub Pr03(Arr(3),Option x,Option y)C.Private Sub Pr03(ByRefx,ByVoly,Arr( ))D.PrivateSubPr03(ParamArrayArr( ))
下列过程定义语句中,形参个数为不确定数量的过程是
A.Pnvate Sub Pr03(x As Double,y As Single)
B.Pdrate Sub Pr03(Arr(3),Option x,Option y)
C.Private Sub Pr03(ByRefx,ByVoly,Arr( ))
D.PrivateSubPr03(ParamArrayArr( ))
相关考题:
( 27 )要想在过程 Proc 调用后返回形参 x 和 Y 的变化结果,下列定义语句中正确的是A ) Sub Proc ( x as Integer,y as Integer )B ) Sub Proc ( ByVal x as Integer, y as Integer )C ) Sub Proc ( x as Integer,Byval y as Integer )D ) Sub Proc ( Byval x as Integer, Byval y as Integer )
下列过程定义语句中,形参个数为不确定数量的过程是( )。A.Private Sub Pro3(x As Double,y As Single)B.Private Sub Pro3(Arr(3),Option x,Option y)C.Private Sub Pro3(ByRef x,ByVal y,Arr( ))D.Private Sub Pro3(ParamArray Arr( ))
下列过程定义语句中,参数不是对象的定义语句是( )。A.Sub Pro4(x As Form)B.Sub Pro4(y As Control)C.Sub Pro4(Form1 As Form,Labell As Control)D.Sub Pro4(x As Currency)
假定有下拉两个过程:Private Sub PPP(a As Single,b As Single)a=a+bPrint a,bb=a+bPrint a,bEnd SubPrivate Sub Form_Activate()x=18Call PPP((x),(x))Print xEnd Sub则下列说法中不正确的是( )。A.形参是a和b,两个实参(x)和(x)允许重名B.形参是a和b,实参(x)表示传值调用C.形参是a和b,实参(x)表示是非传址调用D.形参是a和b,两个实参(x)和(x)不允许重名
对窗体编写如下事件过程: Private Sub Form_ MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) If Button =2 Then Print “AAAAA” End If End Sub Private Sub Form_ MouseUp (Button As Integer,Shift As Integer,X As Single,Y As Single) Print “BBBBB” End Sub 程序运行后,如果单击鼠标右键,则输出结果为______ 。A.AAAAA BBBBBB.BBBBBC.AAAAAD.BBBBB AAAAA
(26)设有下列过程: Private Sub ppp(As Single,b As Single) A=a+b Print a,b B=a+b Print a,b End Sub Private Sub Form_Activate() x=18 Call ppp ((x),(x)) Print x End Sub 则下列说法中不正确的是 A.形参是a和b,两个实参(x)和(y)允许重名 B.形参是a和b,实参(x)表示传值调用 C.形参是a和b,实参(x)表示是非传址调用 D.形参是a和b,两个实参(x)和(y)不允许重名
(12)有下列Sub过程: Sub Sub(x As Single,y As Single) t=x x=t/y y=t Mody End Sub 在窗体上的命令按钮Commandl中,编写下列事件过程,执行该事件过程调用Sun过程,结果是( )。 Private Sub Commandl_Click() Dim a As Single Dim b As Single a=5 b=4 Sun a,b Print a;b End Sub A.1.25 1 B.5 4 C.4 5 D.1 1.25
要求当鼠标在图片框P1中移动时,立即在图片框中显示鼠标的位置坐标。下面能正确实现上述功能的事件过程是A.Private Sub P1_MouseMove(Button As Integer,Shift As Integer,x As Single,Y As Single) Print X,Y End SubB.Private Sub P1_M0useDown(Button As Integer,Shift As Integer,X As Single,Y As Single) Picture.Print X,Y End SubC.Private Sub P1_MouscMove(Button As integer,Shift As Integer,X As Single,Y As Single) P1.Print X.Y End SubD.Private Sub Form_MouseMove(Button As Integer,Shift As Integer,x As Single,Y As Single) P1.Print X.Y End Sub
以下过程的定义中,( )是错误的。 A、Public Sub Sum(x ; y)B、Public Sub Sum(ByVal x, ByVal y)C、Public Sub Sum(x As Integer,y As Integer)D、Public Sub Sum(x%, y%)
下面程序是由鼠标事件在窗体上画图,如果按下鼠标可以画图,双击窗体则可以清除所画图形。补充完整下面的程序。首先在窗体层定义如下变量:Dim PaintStart As Boolean编写如下事件过程:Private Sub Form_Load()DrawWidth=2ForeColor=vbGreenEnd SubPrivate Sub Form_MouseDown(Button As Integer,Shift As Integer,X AS Single,Y AS Single)PaintStart=TrueEnd SubPrivate Sub Form_MouseMove(Button As Integer,Shift As Integer,X As Single,Y As Single)If PaintStart ThenPSet(X,Y)End IfEnd SubPrivate Sub Form_MouseUp(Button As Integer,Shift As Integer,X As Single,Y As Single)End SubPrivate Sub Form_DblClick()ClsEnd Sub
编写如下通用过程: Sub Proc(x As Single,y As Single) t=x x=t/y y=t Mod y End Sub 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Commandl Click() Dim a As Single Dim b As Single a=5 b=4 Proc a,b Print a,b End Sub 程序运行后,如果单击命令按钮,则输出结果为A.5 4B.1.25 1C.4 5D.1.25 5
假定有如下的Sub过程: Sub Func(x As Single, y As Single) t=x x=t/y y=t Mod y End Sub 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim a As Single Dim b As Single a=6 b=5 Func(a, B) Print a, b End Sub 程序运行后,单击命令按钮,输出结果为 ______。A.6 5B.1 1C.1.2 5D.1.2 1
设已经在菜单编辑器中设计了窗体的快捷菜单,某顶级菜单为a1,且取消其“可见”属性。运行时,哪个事件过程可以使快捷菜单的菜单项响应鼠标左键单击和右健单击的事件过程是A.Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) If Button=2 Then PopupMenu a1,2 End SubB.Private Sub Form_MouseDown(ButtonAsInteger,ShiftAsInteger,X As Single,Y As Single) PopupMenu a1,0 End SubC.Private Sub Form_Mouse Down(Button As Integer,Shift As Integer,X As Single,Y As Single) PopupMenu a1 End SubD.Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) If(Button=vbLetfButton) Or (Button=vbRightButton) Then PopupMenu a1 End Sub
假定有如下的Sub过程: Sub S(x As Single,y As Single) t=x x=t/y y=t Mod y End Sub 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim a As Single Dim b As Single a=5 b=2 S a,b print a,b End Sub 程序运行后,单击命令按钮,输出结果是( )。A.5 2B.1 1C.1.25 4D.2.5 1
假定有如下的Sub过程: Sub sfun(x As Single,y As SinglE)t=x x=t/y y=t Mod y End Sub 在窗体上添加一个命令按钮(名为Command1),然后编写如下事件过程: Private Sub Command1_Click( ) Dim a as single Dim b as single a=5 b=4 sfun a,b MsgBox a char(10A.1和1B. 1.25和1C. 1.25和4D. 5和4
假定有以下两个过程: Private Sub PPP(a As Single, b As Single) a=a+b Print a, b b=a+b Print a, b End Sub Private Sub Form_Activate0 x=18 Call PPP((x), (x)) Print x End Sub 则下列说法中不正确的是( )。A.形参是a和b,两个实参(x)和(x)允许重名B.形参是a和b,实参(x)表示传值调用C.形参是a和b,实参(x)表示是非传址调用D.形参是a和b,两个实参(x)和(x)不允许重名
假定有如下的Sub过程:Sub Sub1 (x As Single, y As Single) t=x x = t/y y = t Mod yEnd Sub 在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_ Click() Dim a As Single Dim b As Single a = 5 b = 4 Sub1 a, b Print a; b End Sub 程序运行后,单击命令按钮,输出结果为______。A.5 4B.1 1C.1.2 5.4D.1.25 1
要想在过程Proc调用后返回形参x和Y的变化结果,下列定义语句中正确的是( )。【考点5过程调用与参数传递】A.Sub Proc(x as Integer,Y as Integer)B.Sub Proc(ByVal x as Integer,Y as Integer)C.Sub Proc(x as Integer,ByVal Y as Integer)D.Sub Proc(ByVal x as Integer,ByVal Y as Integer)
现有如下Sub过程: Sub fun(x es single,y as single) t = x x = t/y y = t mod y End sub在窗体上添加命令按钮(cmD) ,编写如下事件过程: Private sub cmd_click( ) Dim a as single Dim b as single a = 5 b = 4 fun a, b Msgbox a chr(10) + chr(13) b End sub运行程序后,单击按钮,则在消息框中显示的内容为( )A.1和1B.1.25和1C.1.25和4D.5和4
下列过程定义语句中,形参个数为不确定数量的过程是( )。A.Private Sub Pr03(XAsDouble,y As Single)B.Private Sub Pr03(Arr(3);Optionx,Optiony)C.Private Sub Pr03(ByRefx,ByValy,Art())D.Private Sub Pr03(Param Array Arr())
有如下Sub过程: Sub Sun(x As Single, y As Single) t=x x=t/y y=t Mod y End Sub 在窗体上的命令按钮Command1中,编写如下事件过程,执行该事件过程调用Sun过程,结果为( )。 Private Sub Command1_Click() Dim a As Single Dim b As Single a=5 b=4 Sun a, b Print a; b End SubA.1.25 1B.5 4C.4 5D.1 1.25
假定有下列两个过程: Private Sub PPP(a As Single, b As Single) a=a+b Print a, b b=a+b Print a, b End Sub Private Sub Form_Activate() x=18 Call PPP((x), (x)) Print x End Sub 则下列说法中不正确的是( )。A.形参是a和b,两个实参(x)和(x)允许重名B.形参是a和b,实参(x)表示传值调用C.形参是a和b,实参(x)表示是非传址调用D.形参是a和b,两个实参(x)和(x)不允许重名
以下定义的过程()是按“传值”方式传递参数的。A、Public Sub Sum(x,y)B、Public Sub Sum(ByVal x, ByVal y)C、Public Sub Sum(x As Integer,y As Integer)D、Public Sub Sum(x%, y%)
下列定义abc过程的语句,正确的是()A、Dim Sub abc(x,y)B、Public abc(x,y)C、Private Sub abc(x,y)As IntegerD、Sub abc(x,y)
单选题假定有如下的Sub过程: SubS (x As Single, y As Single) t = x x = t / y y = t Mod y End Sub 在窗体上添加一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click( ) Dim a As Single Dim b As Singlea = 5: b = 4 S a, b Print a, b End Sub 程序运行时,单击命令按钮得到的结果()。A54B11C1.254D1.251
单选题以下定义的过程()是按“传值”方式传递参数的。APublic Sub Sum(x,y)BPublic Sub Sum(ByVal x, ByVal y)CPublic Sub Sum(x As Integer,y As Integer)DPublic Sub Sum(x%, y%)
单选题下列定义abc过程的语句,正确的是()ADim Sub abc(x,y)BPublic abc(x,y)CPrivate Sub abc(x,y)As IntegerDSub abc(x,y)