07-18-2008, 07:52 AM
Ok, so how are multiple values for a variable represented in binary? For example: flags = 1|2
And how would I test for each value, because this doesn't work: if(flags=1).
This is actually the core of my question.
I am trying to write a function that allows multiple flags, but I don't know how to test for specific values.
So, I looked at your code and that's when I found all the bitwise operations like: if(flags&2=0).
And how would I test for each value, because this doesn't work: if(flags=1).
This is actually the core of my question.
I am trying to write a function that allows multiple flags, but I don't know how to test for specific values.
So, I looked at your code and that's when I found all the bitwise operations like: if(flags&2=0).