Menu

Programatically setting bits in a byte

Help
joe rocci
2014-03-18
2014-03-18
  • joe rocci

    joe rocci - 2014-03-18

    I'd like to be able to set arbitrary bits in a byte under algorithmic control like this:

    dim myByte as byte
    dim myBit as whatever_it_needs_to_be

    myByte = somevalue
    myBit = some_bit_descriptor

    Set myByte.myBit on
    or
    myByte.myBit = 1

    This doesn't seem to work. Is there another way to accomplish the same thing?

    Joe

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.