Vick65
Mar 18th, 2002, 09:20 PM
I am using a dynamic array of bytes. Each byte in the array must store up to 8 bits. Can anybody tell me...
How can I return the bit value (at Index)? and how can I set bit (at Index) to given value (zero or one)?
I HAVE the code: So far I have Sub ResetBit() which resets the bit(at Index) to zero, Sub SetBit() sets the bit(at Index) to 1, Function TestBit() which returns bit value(at Index), ToggleBit() which toggles bit value (at index) and returns the NewValue, Sub Reset() which clears all bits.
I DON'T have the code: I still need a function Value() which will return decimal value for all the bits in the class,
Property Get Bit(index) which returns bit value(at Index),
and Property Let Bit(Index) which sets bit(at Index) to given value (zero or one). If there is anybody who know the code please let me know.
How can I return the bit value (at Index)? and how can I set bit (at Index) to given value (zero or one)?
I HAVE the code: So far I have Sub ResetBit() which resets the bit(at Index) to zero, Sub SetBit() sets the bit(at Index) to 1, Function TestBit() which returns bit value(at Index), ToggleBit() which toggles bit value (at index) and returns the NewValue, Sub Reset() which clears all bits.
I DON'T have the code: I still need a function Value() which will return decimal value for all the bits in the class,
Property Get Bit(index) which returns bit value(at Index),
and Property Let Bit(Index) which sets bit(at Index) to given value (zero or one). If there is anybody who know the code please let me know.