首页
题目
TAGS
首页
/
题库
/
[单选题]在过程定义中有语句: Private S的答案
搜答案
在过程定义中有语句: Private Sub GetData(ByRef f As Integer. 其中"ByRef"的含义是
单选题
2022-01-03 05:08
A、传值调用
B、传址调用
C、形式参数
D、实际参数
查看答案
正确答案
B
试题解析
【解析】ByRef是传址调用,是"双向"调用形式。如果形式参数被说明为传址(ByRef项.,则过程调用是将相应位置实参的地址传送给形参处理,而被调用过程内部对形参的任何操作引起的形参值的变化又会反向影响实参的值。在这个过程中,数据的传递具有双向性,故称为"传址调用"的"双向"作用形式。在过程定义时,如果未做参数说明,则默认为传址调用。所以本题答案为B。
标签:
感兴趣题目
在过程定义中有语句: Private Sub GetData(ByVal data As Integer)其中“ByVal”的含义是( )。
( 33 )在过程定义中有语句: Private Sub GetData (ByVal data As Integer)其中 “ ByVal ” 的含义是( ) 。
设有以下函数过程Private Function Fun(a()As Integer,b As String)As IntegerEhd Function若已有变量声明:Dim x(5)As Integer,n As Integer,ch As String则下面正确的过程凋用语句是
单击命令按钮时,下列程序的执行结果是 Private Sub Command1_Click( ) Dim a As Integer,b As Integer,c As Integer a=3 b=4 C=5 Print SecProc(c,b,A)End Sub Function Fir Proc(x As Integer,y As Integer,z As Integer) Fir Proc=2*x+y+3*z End Function Function SecProc(x As Integer,y As Integer,z As Integer) SecProc=FirProc(z,x,y)+x End Function
有以下函数过程: Function Gys (ByVal x As Integer, ByVal y As Integer) As Integer Do While y<>0 Reminder = x Mod y x = y y= Reminder Loop Gys=x End Function 以下是调用该函数的事件过程,该程序的运行结果是 Private Sub Command1_Click() Dim a As Integer Dim b As Integer a = 50 b = 10 x=Gys (a,B)Print x End Sub
有如下函数过程: Function Fun(By Val x As Integer,By Val y As Integer)As Integer Do While Y<>0 reminder=x Mod y x=y y=reminder Loop Fun=x End Function 以下调用函数的事件过程,该程序的运行结果是 Private Sub Command7_Click() Dim a As Integer,b As Integer a=100:b=25 x=Fun(a,B) Print x End Sub
有如下函数过程: Function HFC(ByVal x AS Integer,ByVal y As Integer)As Integer Do While y < > 0 sic=x/y X=y y=sic Loop HFC=x End Function 以下是该函数的调用过程,该程序的运行结果是 Private Sub Command1 _ Click( ) Dim a AS Integer Dim b As Integer a=12 b=2 x=HFC(a,B)Print x End Sub
有如下函数过程: Function Fun (By Val x As Ingeger, ByVal y As Integer)As Integer Do While…y<>0 reminder=x Mod y x=y y=reminder Loop Fun=x End Function 以下是调用该函数的事件过程,该程序的运行结果是 Private Sub Command1_Click() Dim a As Integer Dim b As Integer a=100:b=25 x=Fun(a,b)Print x End Sub
"程序中有两个过程Private Sub Fun1(S As String)和Private Sub Fun2(a()As String*6),在调用过程中用Dim St(6)As String*6定义了一个字符串数组。下面调用语句中正确的是() ①Call Fub1(St(3)) ②Call Fun2(St) ③Call Fun1(St) ④Call Fun2(St(6))
定义两个过程Private Sub Fun 1(S as String)和Private Sub Fun2 (a( )as String*6),在调用过程中用Dim St (6) as String*6定义了一个字符串数组。下面调用语句中正确的有()。 ①Call Fun1(St(3)) ②Call Fun2(St) ③Call Fun1(St) ④Call Fun2(st(6))
下面过程运行之后,则变量J的值为( )。 Private Sub Fun() Dim J As Integer J=5 Do J=J+2
单击命令按钮时,下列程度段的执行结果为( )。 Private Sub Command1_Click() Dim a As Integer, b As Integer, c As Integer a=2:b=4:c=6 Call S1(a,B) Print "a="; a; "b="; b; "c="; c Call S2(a,B) Print "a ="; a; "b ="; b; "c="; c; End Sub Private Sub S1(x As Integer, y As Integer) Dim c As Integer x=2*x:y=y+2:c=x+y End Sub Sub S2(x As Integer, ByVal y As Integer) Dim e As Integer x=2*x:y=y+2:c=x+y End Sub
相关题目
下面过程运行之后,则变量J的值为( )。 Private Sub Fun() Dim J As Integer J=5 Do J=J*2
下面过程运行之后,变量J的值为( )。 Private Sub Fun() Dim J As Integer J=5 Do J=J * 2
下面过程运行之后,则变量J的值为( )。 Private Sub Fun() Dim J As Integer J=5 Do J=J*2
在代码窗口中,有如下事件过程,以下叙述正确的是______。Private Sub Option1_Click(Index As Integer)……End Sub
有如下一个Sub过程: Sub mlt(ParamArray numbers()) n=1 For Each x In numbers n=n*x Next x Print n End Sub 在一个事件过程中如下调用该Sub过程: Private Sub Command1_Click() Dim a As Integer Dim b As Integer Dim c As Integer Dim d As Integer a=1 b=2 c=3 d=4 mlt a,b,c,d End Sub 该程序的运行结果为( )。
有如下一个Sub过程: Sub mlt (ParamArray numbers()) n=1 For Each x In numbers n=n * x Next x Print n End Sub在一个事件过程中如下调用该Sub过程: Private Sub Coinmand1_Click() Dim a As Integer Dim b As Integer Dim c As Integer Dim d As Integer a=1 b=2 c=3 d=4 mlt a,b,c,d End Sub 则运行该程序,结果为______。
在窗体中添加一个名称为Cmd的命令按钮,然后编写如下程序: Public x As integer Private Sub Cmd_Click() x=10 Call add1 Call add2 MsgBox x End Sub Private Sub add1 ( ) x=x+20 End Sub Private Sub add2 ( ) Dim x As integer x=x+40 End Snb 窗体打开运行后,单击命令按钮,则消息框的输出结果为( )。
在以下事件中,Private表示 Private Sub sub1(x As Integer,y As Integer) ...End Sub
在过程定义中有语句:Private Sub GetData(ByVal data As Integer),其中“ByVal”的含义是( )。
在过程定义中有语句: Private Sub GetData(ByRef f As Integer. 其中"ByRef"的含义是
编写如下事件过程和函数过程: Private Sub Form_Chck() DimBum(1 To 6)As Single num(1)=103:num(2)=190:num(3)=0 Bum(4)=32:num(5)=-56:num(6)=100 Print Pdnt p2(6,hum()) End Sub Private Function p2(ByVal n As Integer,number()As Single)As Integer p2=
执行下列程序后,鼠标单击窗体,输出结果为 Private Sub Form_Click() Print"Click": End Sub Private Sub Form_MouseDown(Button As Integer,Shift_As Integer,X As Single,Y As Single) Print"Donw" End Sub Private Sub Form_MouseUp(Button As Integer,Shift_As Integer,X As Single,Y As Single) Print"Up" End Sub
执行下列程序后,鼠标单击窗体,输出结果为。 Private Sub Form_Click() Print“Click”; End Sub Private Sub Form_MouseDown(Button As Integer,Shift_ As Integer,X As Single,Y As Single) Print “Donw” End Sub Private Sub Form_MouseUp(Button As Integer,Shift_ As Integer,X As Single,Y As Single) Print“Up” End Sub
若看到程序中确以下事件过程,则可以肯定的是,当程序运行时( )。 Private Sub Click—MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) Print"VB Program" End Sub
若看到程序中确以下事件过程,则可以肯定的是,当程序运行时( )。Private Sub Click—MouseDown(Button As Integer,Shift As Integer,X As Single,YAs Single)Print"VB Program"End Sub
若看到程序中有以下事件过程,则可以肯定的是,当程序运行时( )。 Private Sub Click MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) Print”Visual Basic Program” End Sub
若看到程序中有以下事件过程,则可以肯定的是,当程序运行时Private Sub Click_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single)Print”VB Program”End Sub
已知有下面过程: Private Sub proc1(a As Integer,b As String,Optional x As Boolean) ...... End Sub 正确调用此过程的语句是______。
已知有下面的过程Private Sub proc1(a As Integer,b As String,Optional x As Boolean)……End Sub正确调用此过程的语句是( )。
有过程如下:Sub fact (m As Integer, total As Long) Dim i As Integer total = 1 for i = 1 To m total = total*i Next iEnd Sub调用它的事件过程如下:Private Sub Command1_ Click () Dim tot As Long Dim a As Integer a = Val InputBox (“请输入数据”)) Call fact (a, tot) Print totEnd Sub则输入数据5,运行结果为 ______。
广告位招租WX:84302438
题库考试答案搜索网
免费的网站请分享给朋友吧