This may seem trivial to the more experienced. I want to index each bit of a variable (e.g. MyVariable) and put it on a port. The compiler does not allow:
FOR BitCount=0 TO 15
PortC.1=MyVariable.BitCount
NEXT BitCount
Why not? Instead I have to do it this messy way:
Temp=MyVariable
FOR BitCount=0 TO 15
IF BitCount>0 THEN Temp<<1
PortC.1=Temp.15
NEXT BitCount
Any suggestions for a cleaner way, folks?
Bookmarks