> 其他 >
问大家一个vb判断true or false
private sub form_click()
dim s as Boolean
a=2:b=3:c=4:d=5
s=a>b and 2*a>c or cb and 2*a>c or c
人气:209 ℃ 时间:2020-02-03 06:07:36
解答
主要是运算符优先级的问题,用括号括一下,可能你就容易理解了
s = (a>b and (2*a)>c) or c3 and (2*2)>4) or 44) or true
s = (false and false) or true
s = false or true
s = true
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版