VB6 中布尔 False 和 True 的整数值是什么? [英] What are the Integer values of Boolean False and True in VB6?
本文介绍了VB6 中布尔 False 和 True 的整数值是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用一些旧的 VB6 代码,这样......
I'm working with a bit of old VB6 code that goes thus...
Dim STATUS As Integer
STATUS = -1
If (Not STATUS) Then
' do something
Else
' do something else
End If
所以我很自然地想知道执行了这段代码的哪个分支.那么有谁知道VB6中True和False的数值是多少?
so I was, naturally, wondering which branch of this code is executed. So does anyone know what the numeric values of True and False are in VB6?
推荐答案
True 存储为 -1,false 存储为 0.任何非零值都被认为是 true.
True is stored as -1 and false as 0. Any non-zero value is considered as true.
要了解为什么会这样,请查看 - http://www.vbforums.com/showthread.php?t=405047
To see why it is so please check - http://www.vbforums.com/showthread.php?t=405047
这篇关于VB6 中布尔 False 和 True 的整数值是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文