Results 1 to 3 of 3

Thread: bitflags, how exactly can they be used?

  1. #1
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default bitflags, how exactly can they be used?

    recently, iv been intrigued by bitflags, (shl, shr, ect). i understand how to use them and that its used to save cpu memory, and its faster, but what real uses are there in a script?

    im looking for examples / ideas, so i can learn more about them
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  2. #2
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    You can use an integer to store settings, for example. Depending on how many bits you need for each setting, you could store a variety of them in one variable instead of having multiple booleans and integers to accomplish the same task.
    :-)

  3. #3
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    Quote Originally Posted by Method View Post
    You can use an integer to store settings, for example. Depending on how many bits you need for each setting, you could store a variety of them in one variable instead of having multiple booleans and integers to accomplish the same task.
    care to give an example though?
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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