Private Sub Form_Click() Dim s As String, i As Integer, n(9) As Integer Dim s1 As String * 1, j As
PrivateSubForm_Click()DimsAsString,iAsInteger,n(9)AsIntegerDims1AsString*1,jAsInteger...
Private Sub Form_Click()
Dim s As String, i As Integer, n(9) As Integer
Dim s1 As String * 1, j As Integer
s = "12345a307291b233"
For i = 1 To Len(s)
s1 = Mid(s, i, 1)
If s1 >= "0" And s1 <= "9" Then
j = Val(s1)
n(j) = n(j) + 1
End If
Next i
For j = 0 To 9
Print j; ":"; n(j)
Next j
End Sub
这个怎么解释
j = Val(s1)
n(j) = n(j) + 1 展开
Dim s As String, i As Integer, n(9) As Integer
Dim s1 As String * 1, j As Integer
s = "12345a307291b233"
For i = 1 To Len(s)
s1 = Mid(s, i, 1)
If s1 >= "0" And s1 <= "9" Then
j = Val(s1)
n(j) = n(j) + 1
End If
Next i
For j = 0 To 9
Print j; ":"; n(j)
Next j
End Sub
这个怎么解释
j = Val(s1)
n(j) = n(j) + 1 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询