题型:综合题 题类:常考题 难易度:普通
浙江省高中信息技术——VB基础知识
Private Sub com _ Click( )
Dim i As Integer, a As String, p As string
s=Text1.Text
n=Len (s)
p= “”
i=1
f =True
Do While i < = n
If Mid(s, i, 1)= “0” Then
p= p + “A”
i=i+1
ElseIf Mid(s, i+1, 1)= “1” Then
p = p + “T”
①
ElseIf Mid(s, i+2, 1) = “1” Then
p = p+ “G”
i=i+3
ElseIf Mid(s, ② , 1)= “0” Then
p = p + “C”
i=1+3
Else
f=False
i=i+n
End If
Loop
If f Then Label1. Caption Else. Caption = “接收有误”
End Sub
① ②
试题篮