A-A+

设有下列通用过程:Public Function Fun(xStr As String)As StringDim tStr As String strL As In

2021-01-22 15:50:00 IT认证 阅读

问题详情

设有下列通用过程:

Public Function Fun(xStr As String)As String

Dim tStr As String,strL As Integer

tStr=""

strL=Len(xStr)

i=strL/2

DO While i<=StrL

tStr=tStr&Mid(xStr,i+1,1)

i=i+1

Loop

Fun=tStr&tStr

End Function

在窗体上画一个名称为Textl的文本框和一个名称为Command1的命令按钮。然后编写下列的事件过程:

Private Sub Commandl Click()

Dim S1 As String

S1="ABCDEF"

Text1.Text=LCase(Fun(S1))

End Sub

程序运行后,单击命令按钮,文本框中显示的是()。

A.ABCDEF

B.abedef

C.defdef

D.defabc

请帮忙给出正确答案和分析,谢谢!

参考答案

考点: