In the context of that program ...
IF CRC.0(CRC_Len-1) THEN
compiles to the exact same thing as ...
IF CRC.15 THEN
And at the assembly level, it's 2 instructions ...
btfss _CRC + 1, 7
goto TestFailed
This allows the CRC length to be changed via a constant, with the least amount of code.
And gets around the desire to use a variable or constant as the bit number.
IF CRC.CRC_Len THEN ; This notation doesn't work.
<hr>
The CRC.0(x) notation tells PBP to treat the variable as a BIT array, and is discussed in these threads.
Bits, Bytes Words and Arrays (Melanie)
http://www.picbasic.co.uk/forum/showthread.php?t=544
Indexing Port Pins (Bruce)
http://www.picbasic.co.uk/forum/showthread.php?t=3753
hth,
Bookmarks