问大家一个vb判断true or false private sub form_click()dim s as Booleana=2:b=3:c=4:d=5s=a>b and 2*a>c or cb and 2*a>c or c
问题描述:
问大家一个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
答
主要是运算符优先级的问题,用括号括一下,可能你就容易理解了
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