首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

not的有关问题

2013-06-26 
not的问题Private Sub Command1_Click()a -1b 20c 30If Not a Thenb b + cElseb b - cEnd IfMsg

not的问题
Private Sub Command1_Click()
a = -1
b = 20
c = 30
If Not a Then
b = b + c
Else
b = b - c
End If
MsgBox b
End Sub

If Not a Then 这句怎么理解呢?本人蒙了。如果换成a =0呢
[解决办法]
True 的值为-1
所以
a=-1
等价于
a=True

if not a then ...
等价于
if not True then ...

热点排行