Hi,
I migrated from PicBasic to PicBasicPro and I found this code stops running well.
MR var word: H var byte
for H=0 to 15
MR.0[H]=1 'set bit H of MR
next H
I supose this code sets to 1 all bits of MR but not works.
Any ideas?
Many thanks,
Ricard.
Printable View
Hi,
I migrated from PicBasic to PicBasicPro and I found this code stops running well.
MR var word: H var byte
for H=0 to 15
MR.0[H]=1 'set bit H of MR
next H
I supose this code sets to 1 all bits of MR but not works.
Any ideas?
Many thanks,
Ricard.
Try MR var bit[16]
Thanks Joe,
I mean to read single bits I can use MR[bit] instead of MR.0[bit]??
Also, I can keep using this variable as a Word? I mean for example if I can assign this bit variable to a word variable:
W var word
MR=W
Can I do that?
Many thanks,
Ricard.
I think what you need is in this post:
http://www.picbasic.co.uk/forum/showthread.php?t=544
or here:
http://www.picbasic.co.uk/forum/showthread.php?t=3891