ACALL MYPROC X,Y
BCALL MYPROC(X,Y)
CMYPROC X,Y
DMYPROC(X,Y)
第1题:
已知有下面的过程
Private Sub proc1(a As Integer,b As String,Optional x As Boolean)
……
End Sub
正确调用此过程的语句是( )。
A.Call procl(5)
B.Call proc1 5,”abc”,False
C.proc1(12,”abc”,True)
D.proc1 5, “abc”
第2题:
( 23 )已知有下面的过程( )
Private Sub proc1 ( a As Integer,b As String,Optional x As Boolean )
……
End Sub
正确调用此过程的语句是
A ) Call procl ( 5 )
B ) Call proc1 5, ” abc ” ,False
C ) proc1 ( 12, ” abc ” ,True )
D ) proc1 5, “ abc ”
第3题:
A.Function过程可以有参数,而Sub过程不可以
B.两种过程参数的传递方式不同
C.Sub过程无返回值,但Function过程有返回值
D.Sub过程是语句级调用,可以使用Call或直接使用过程名,但Function过程是在表达式中调用
第4题:
(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
第5题:
设有下列过程: Sub ff(x,y,z) X=y+z End Sub 下列选项中所有参数的虚实结合都是传址方式调用的是 A.Call ff(5,7.z) B.Call ff(x,y.z)C.Call ff(3+X,5+Y,z) D.Call ff(x+y,x-y,z)
第6题:
若要在子过程Procl调用后返回两个变量的结果,下列过程定义语句中有效的是( )。
A.Sub Proc1(n,m)
B.Sub Proc1(ByVal n,m)
C.Sub Proc1(n,BYVal m)
D.Sub Proc1(ByVal n,ByVal m)
第7题:
以下叙述不正确的是: ______。
A.在Sub过程中可以调用Function过程
B.在用Call调用Sub过程时必须把参数放在括号里
C.在Sub过程中可以嵌套定义Function
D.用Static声明的过程中的局部变量都是Static类型
第8题:
( 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 )
第9题:
(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)不允许重名
第10题:
此题为判断题(对,错)。