- 积分
- 705
- 明经币
- 个
- 注册时间
- 2014-12-18
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
Private Sub Command1_Click()
Dim a, b, c As Integer
Dim a1 As String
a1 = Text1.Text
a = 0
b = 0
c = 0
Call shiqu(a1, a, b, c)
Text2.Text = a
End Sub
Function shiqu(ByRef TT As String, ByRef n As Integer, ByRef m As Integer, ByRef p As Integer)
Dim AAA, BBB As String
Dim I, JJ, CC As Integer
Dim a, b, c As Integer
AAA = TT
CC = Len(AAA)
BBB = ""
If CC >= 11 Then
I = 4
For JJ = 1 To I
If Asc(Mid(AAA, JJ, 1)) >= 48 And Asc(Mid(AAA, JJ, 1)) <= 57 Then
BBB = BBB & Mid(AAA, JJ, 1)
Else
I = I + Val(BBB)
BBB = ""
End If
Next
a = 0
a = Val(BBB)
n = a
For JJ = 1 To 9
If Asc(Mid(AAA, JJ, 1)) >= 48 And Asc(Mid(AAA, JJ, 1)) <= 57 Then
BBB = BBB & Mid(AAA, JJ, 1)
Else
I = I + Val(BBB)
BBB = ""
End If
Next
b = 0
b = Val(BBB)
m = b
For JJ = 1 To CC
If Asc(Mid(AAA, JJ, 1)) >= 48 And Asc(Mid(AAA, JJ, 1)) <= 57 Then
BBB = BBB & Mid(AAA, JJ, 1)
Else
I = I + Val(BBB)
BBB = ""
End If
Next
d = 0
d = Val(BBB)
p = d
Else: I = 3
For JJ = 1 To I
If Asc(Mid(AAA, JJ, 1)) >= 48 And Asc(Mid(AAA, JJ, 1)) <= 57 Then
BBB = BBB & Mid(AAA, JJ, 1)
Else
I = I + Val(BBB)
BBB = ""
End If
Next
a = 0
a = Val(BBB)
n = a
For JJ = 1 To 7
If Asc(Mid(AAA, JJ, 1)) >= 48 And Asc(Mid(AAA, JJ, 1)) <= 57 Then
BBB = BBB & Mid(AAA, JJ, 1)
Else
I = I + Val(BBB)
BBB = ""
End If
Next
b = 0
b = Val(BBB)
m = b
For JJ = 1 To CC
If Asc(Mid(AAA, JJ, 1)) >= 48 And Asc(Mid(AAA, JJ, 1)) <= 57 Then
BBB = BBB & Mid(AAA, JJ, 1)
Else
I = I + Val(BBB)
BBB = ""
End If
Next
d = 0
d = Val(BBB)
p = d
End If
End Function
|
|