Results 1 to 5 of 5

Thread: Boolean = 16 bit in VB... Is this true ??

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 1999
    Posts
    309

    Post

    Is a boolean 2 byte in vb ??

  2. #2
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Rotterdam, Netherlands
    Posts
    386

    Post

    Yes, a boolean is 2 bit..
    You can check it with the LenB function.

  3. #3
    Addicted Member c@lle's Avatar
    Join Date
    Oct 1999
    Location
    Belgium
    Posts
    179

    Post

    I think there IS a little difference between bits and bytes!

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 1999
    Posts
    309

    Post

    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).]

  5. #5
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Post

    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



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width