下列VB程序运行时,在文本框Text1中输入字符串“while”,在文本框Text2和Text3中分别输入2和5,单击命令按钮Command1后,在文本框Text4中显示的内容是{#blank#}1{#/blank#}。
Private Sub Command1_click
( )
Dim n As Integer , m
As Integer , k As Integer
n
= Len ( Text1.Text )
m = Val ( Text2.Text )
k
= Val ( Text3.Text )
If m + k -1 > n Then
Text4.Text = Mid ( Text1.Text , 1 , m – 1 )
Else
Text4.Text = Mid ( Text1.Text , 1 , m–1 ) + Mid ( Text1.Text , m+k , n–m–k
+1 )
End
If
End Sub