Is a boolean 2 byte in vb ??
Printable View
Is a boolean 2 byte in vb ??
Yes, a boolean is 2 bit..
You can check it with the LenB function.
I think there IS a little difference between bits and bytes! ;)
If only it where 2 bit ;)
But seriously... I was almost sure it was 16 bit.... I just needed somebody's confirmation... So Crazy D's reply was clear enough to me.... :)
[This message has been edited by Inhumanoid (edited 11-26-1999).]
Yes, it's true! A boolean is actually an integer, so you will not save any memory on using it. It's just as fast as an integer though, and most important it's safe to use.
By safe I mean that you can't give it any other values than those intended (true or false). Actually the boolean data type didn't exist in VB before version 4. The reason it was included was to be used in classes where you wanted to have properties with only boolean values.
------------------
Joacim Andersson
[email protected]
[email protected]
www.YellowBlazer.com