( ?。?/div>
( )
Dim i As Integer,j As Integer
Dim ttda As String,ckda As String,tt As String,ck As String
ttda=Text1.Text
ckda=Text2-Text
i=1:j=1
Do While i<=Len(ttda)And j<=Len(ckda)
tt=midd(I,ttda):ck=midd(j,ckda)
If Len(tt)<>0 Then
tt1=xxsz(tt):ck1=xxsz(ck)
If
tt1=ck1
tt1=ck1
Then
df=2
Else
For k=1 To 4
If Mid(ttl,k,l)?Mid(ckl,k,l) Then Exit For(*)
Next k
If k=5 Then df=1 Else df=0
End If
zf=ft+df
End If
i=i+Len(tt)+1:j=j+Len(ck)+1
Loop
Label3.Caption=“總計“+Str(zf)+“分“
End Sub
Function xxsz(s As String)As String′將選項轉(zhuǎn)換為對應(yīng)四位二進(jìn)制數(shù),已知大寫字母“A“的ASCII碼值為65
t=“0000“
For i=1 To Len(s)
Mid(t,Asc(Mid(s,i,1))-64,1)=“1“或t=Mid(t,1,Asc(Mid(s,i,1))-64-1)+“1“+Mid(t,Asc(Mid(s,i,1))-64-1)
Mid(t,Asc(Mid(s,i,1))-64,1)=“1“或t=Mid(t,1,Asc(Mid(s,i,1))-64-1)+“1“+Mid(t,Asc(Mid(s,i,1))-64-1)
Next i
xxsz=t
End Function
Function midd(k As Integer,s As String)As String′讀取每題選項
Dim i As Integer
i=k
Do While i<=Len(s)
If Mid(s,i,1)<>“,“Then
midd=midd+Mid(s,i,1)
midd=midd+Mid(s,i,1)
Else
Exit Function
End If
i=i+1
Loop
End Function