[试题]

试题六

阅读以下应用说明及Visual Basic部分程序代码,将应填入(n)处的字句写在答题纸的对应栏内。

(说明)

单击窗体上的"测试"(cmdTest)按钮,出现一个输入框,要求输入一串字符,将该字符串中的非字母字符删除后,显示在窗体中的一个文本框(txtShow)中。

(程序代码)

Private Sub cmdTest_Click()

D.im strT1,strT2 As String

D.im strCh As (1)

D.im intL As Integer

D.im intI As Integer

strT1= (2) ("请输入一串字符","字符串输入")

intL= (3)

strT2=″″

F.or intI=l To intL

strCh=Mid(strT1,intI,1)

If(strCh>"A"And (4) ) Or (strCh>"a" And suCh<"z")Then

strT2=strT2+strCh

E.nd If

Next intI

txtShow.Text= (5)

E.nd sub

参考答案与解析: