( ?。?/div>
Dim i As Integer,j As Integer,n As Integer
Dim ch As String,s As String,ss As String
s=Text1.Text
n=0:ss=““
i=1
Do While i<=Len(s)
ch=Mid(s,i,1)或ch=Mid(Text1.Text,i,1)
ch=Mid(s,i,1)或ch=Mid(Text1.Text,i,1)
If ch>=“0“And ch<=“9“Then
n=n*10+Val(ch)
n=n*10+Val(ch)
Else
For j=1 To n
ss=ss+ch
Next j
n=0
End If
i=i+1
i=i+1
Loop
Text2.Text=ss
End Sub
(4)運行程序,若文本框Text1中輸入的內容為“Y3a5”,則輸出的解壓字符串為
aaa
aaa
。