Testing Bits in variables..
Am I missing something here? I have a declared word variable and byte variable.
Why can't I test bits in the word variable using the byte variable as the pointer?
Count1 being 0-9 in this example. I want to test the bits in turn in positions 0-9 using a loop.
if databyte.Count1 = 1 then
above causes a compile error "Bad variable modifier"
Re: Testing Bits in variables..
Try:
if databyte.0[Count1] = 1 then
Re: Testing Bits in variables..
Yep, see section 7.6.5 in the PBP3 manual and/or see the [url=http://www.picbasic.co.uk/forum/showthread.php?t=544&highlight=bits+bytes+wordsBit s, Bytes, Words & Arrays[/url] thread starting with Melanies excellent primer on the subject.
/Henrik.