F
fd123456
Tom,
MWells is right, this is the .Net way of manipulating bits. Besides,
your question was rather ambiguous :
Did you mean "are there any functions in the framework that resemble
the "bittest", "bitset" syntax I'm used to", or "How shall I go about
writing a sub to test/set bits"?
In the first case : no, there aren't.
In the second case : you should either use the BitArray class or go
through bitwise operators and powers of two.
bitset(a,2) : a = a & (2 ^ 1) for instance. There are lots of ways to
do this.
Also remember that if it's the extra typing you're worried about, you
can write your own BitTest, etc., methods that encapsulate BitArray
functions, once and for all.
Michel
MWells is right, this is the .Net way of manipulating bits. Besides,
your question was rather ambiguous :
Did you mean "are there any functions in the framework that resemble
the "bittest", "bitset" syntax I'm used to", or "How shall I go about
writing a sub to test/set bits"?
In the first case : no, there aren't.
In the second case : you should either use the BitArray class or go
through bitwise operators and powers of two.
bitset(a,2) : a = a & (2 ^ 1) for instance. There are lots of ways to
do this.
Also remember that if it's the extra typing you're worried about, you
can write your own BitTest, etc., methods that encapsulate BitArray
functions, once and for all.
Michel