Function Custom_GL(NUMBER) 'Custom_GL表示软件要调用的函数名,这个不可改变
Custom_GL = False 'False表示NUMBER不会被过滤,首先初始化设置号码不被过滤
BW = CInt(Left(NUMBER, 1)) 'BW表示号码的百位
SW = CInt(Mid(NUMBER, 2, 1)) 'SW表示号码的十位
GW = CInt(Right(NUMBER, 1)) 'GW表示号码的个位
Dim t As Integer, h As Integer, y As Integer
b = BW
e = SW
f = GW
If b < e Then
t = b
b = e
e = t
End If
If b < f Then
t = b
b = f
f = t
End If
If e < f Then
h = b - e
Else
h = b - f
End If
y = (b + e + f) Mod 10
If (y Mod 2 <> 0) And (h Mod 2 <> 0) Then
s = 20
ElseIf (y Mod 2 = 0) And (h Mod 2 = 0) Then
s = 10
ElseIf (y Mod 2 <> 0) And (h Mod 2 = 0) Then
s = 30
ElseIf (y Mod 2 = 0) And (h Mod 2 <> 0) Then
s = 40
End If
T = "%条件%"
If InStr("," & T & ",", "," & S & ",") <> 0 Then
Custom_GL = True '如果满足上面条件的就是true,也就是号码就会被过滤掉
Else
Custom_GL = False
End If
End Function
帮我看看这段VB代码怎么提示语句未结束
答案:2 悬赏:50 手机版
解决时间 2021-03-12 22:10
- 提问者网友:藍了天白赴美
- 2021-03-12 05:53
最佳答案
- 五星知识达人网友:拜訪者
- 2021-03-12 07:16
这样试试看?
Function Custom_GL(NUMBER) 'Custom_GL表示软件要调用的函数名,这个不可改变
Custom_GL = False 'False表示NUMBER不会被过滤,首先初始化设置号码不被过滤
BW = CInt(Left(NUMBER, 1)) 'BW表示号码的百位
SW = CInt(Mid(NUMBER, 2, 1)) 'SW表示号码的十位
GW = CInt(Right(NUMBER, 1)) 'GW表示号码的个位
Dim t As Integer, h As Integer, y As Integer
b = BW
e = SW
f = GW
If b < e Then
t = b
b = e
e = t
End If
If b < f Then
t = b
b = f
f = t
End If
If e < f Then
h = b - e
Else
h = b - f
End If
y = (b + e + f) Mod 10
If (y Mod 2 <> 0) And (h Mod 2 <> 0) Then
S = 20
ElseIf (y Mod 2 = 0) And (h Mod 2 = 0) Then
S = 10
ElseIf (y Mod 2 <> 0) And (h Mod 2 = 0) Then
S = 30
ElseIf (y Mod 2 = 0) And (h Mod 2 <> 0) Then
S = 40
End If
t1 = "%条件%" ‘这二行改过了
If InStr("," & t1 & ",", "," & S & ",") <> 0 Then
Custom_GL = True '如果满足上面条件的就是true,也就是号码就会被过滤掉
Else
Custom_GL = False
End If
End Function
Function Custom_GL(NUMBER) 'Custom_GL表示软件要调用的函数名,这个不可改变
Custom_GL = False 'False表示NUMBER不会被过滤,首先初始化设置号码不被过滤
BW = CInt(Left(NUMBER, 1)) 'BW表示号码的百位
SW = CInt(Mid(NUMBER, 2, 1)) 'SW表示号码的十位
GW = CInt(Right(NUMBER, 1)) 'GW表示号码的个位
Dim t As Integer, h As Integer, y As Integer
b = BW
e = SW
f = GW
If b < e Then
t = b
b = e
e = t
End If
If b < f Then
t = b
b = f
f = t
End If
If e < f Then
h = b - e
Else
h = b - f
End If
y = (b + e + f) Mod 10
If (y Mod 2 <> 0) And (h Mod 2 <> 0) Then
S = 20
ElseIf (y Mod 2 = 0) And (h Mod 2 = 0) Then
S = 10
ElseIf (y Mod 2 <> 0) And (h Mod 2 = 0) Then
S = 30
ElseIf (y Mod 2 = 0) And (h Mod 2 <> 0) Then
S = 40
End If
t1 = "%条件%" ‘这二行改过了
If InStr("," & t1 & ",", "," & S & ",") <> 0 Then
Custom_GL = True '如果满足上面条件的就是true,也就是号码就会被过滤掉
Else
Custom_GL = False
End If
End Function
全部回答
- 1楼网友:英雄的欲望
- 2021-03-12 07:46
我是来看评论的
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯