第1个回答 2011-06-22
Private Sub Command1_Click()
Dim strallthings(1 To 3) As String
strallthings(1) = "LY"
strallthings(2) = "LB"
strallthings(3) = "YB"
For i = 1 To 3
If Comparison(strallthings(i)) = True Then
Select Case strallthings(i)
Case "LY"
Print "第一次带走白菜,第二次带走羊或者狼"
Case "LB"
Print "第一次带走羊,第二次带走狼或者白菜"
Case "YB"
Print "第一次带走狼,第二次带走羊或者白菜"
End Select
End If
Next i
End Sub
Private Function Comparison(strget As String) As Boolean
Select Case strget
Case "LY"
Comparison = False
Case "LB"
Comparison = True
Case "YB"
Comparison = False
End Select
End Function