how can I test a bit in a arrow
hello,
I would test a bit in a buffer of arrow
I have a buffer of 8 bytes
for exemple:
buffer var byte[8]
buffer[0] = %11110000
buffer[1] = %10011010
...
if buffer[1].2 == 1 then ... 'test bit 2 of buffer[1]
(the value is just an exemple)
but "buffer[1].2" don't work and return an errorERROR Line 93: This style array syntax not supported, (test.pbp)
how can I test a bit in a arrow?
Re: how can I test a bit in a arrow
Hi,
Bit 2 of the second byte in the array would be bit 10 in the array, correct?
So, IF Buffer.0(10) == 1 THEN
For more in depth information please see this thread.
/Henrik.
Re: how can I test a bit in a arrow
Quote:
Originally Posted by
kik1kou
...
if buffer[1].2 == 1 then ...
'test bit 2 of buffer[1]
(the value is just an exemple)
but "buffer[1].2" don't work and return an error
ERROR Line 93: This style array syntax not supported, (test.pbp)
how can I test a bit in a arrow?
Another idea to test bits of an array variable, use a temp variable
Code:
TempVar = Buffer[1]
If TempVar.2 == 1 then.....
Re: how can I test a bit in a arrow
Quote:
Originally Posted by
mister_e
Another idea to test bits of an
array variable, use a temp variable
Code:
TempVar = Buffer[1]
If TempVar.2 == 1 then.....
yes I do the same, but I thinked have more simple code for do it
sorry for the english 'arrow => array' ;-)
Re: how can I test a bit in a arrow
That would be great if there was a direct way to do it like you wrote, but I don't know any way to do it AS-IS.
Quote:
sorry for the english 'arrow => array' ;-)
sssshhh, that will be our secret ;) Don't worry... i'm not English either.