On 12/11/09 10:09 PM, Iñaki Baz Castillo wrote:
El Viernes, 11 de Diciembre de 2009, Daniel-Constantin
Mierla escribió:
So if I have a value of
192, does that mean flags 7 and 8 are set ? This confuses me cause I set
flags 6 and 7.
Is 2^7 + 2^8 == 192 ?
The index for flags starts from 0 going up to 31
Thanks for clarification. In fact my comment was a question because I
didn't
remember it :)
I got it so and 2^6 + 2^7 = 192
But I wanted to clarify that position of the flag in bitmask starts with
0 -- so if you count from 0, setflag(6) sets the 6th flag, if you count
from 1, it sets the 7th flag.
Cheers,
Daniel
--
Daniel-Constantin Mierla
*
http://www.asipto.com/