使用 VB 编写一个数字逆序功能的程序,在文本框 Text1 中输入若干整数,相互之间用逗号隔开,单击“开始逆序”按钮,在文本框 Text2 中输出逆序后的数字序列。程序运行界面如图所示,请改正划线处的错误语句使程序能正确运行。
Private sub Command1_click()
Dim s1 As String, s2 As String, t As String, ch As String
Dim i As Integer
s1 = Text1.Text
i = Len(s1)
t = "": s2 = ""
Do While i > 0
ch = Mid(s1, i, 1)
If ch >= "0" And ch <= "9" Then
t = ch + t
Else
s2 = s2 + t +, ①
t = ""
End If
i = i + 1 ②
Loop
s2 = s2 + t
Text2.Text = s2
End sub
①{#blank#}1{#/blank#} ②{#blank#}2{#/blank#}