justadude
2019-09-18 20:28:41
I am trying to work with bit operators, but somehow my statement remains red. What am I missing here in this statement? Variable ss, tt and g0 have been set to 0.
This fails
if ss == 0 then g0 = g0|(1<<tt)
This fails too
if ss == 0 then g0 = g0|1<<tt
I am really curious to see what I do wrong here.
Thank you in advance.
Steve-Bome Forum Moderator
2019-09-18 20:38:18
Hi, you cannot do compound math operations within rules.
Try this:
if ss==0 then goto “label1”
// do other stuff here
// skip over label1 for false condition
goto “done”
label “label1”
qq=1<<tt
go=go|qq
label “done”
There are other ways to do it, but this was just off of the top of my head.
Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz
justadude
2019-09-18 20:59:44
comment
Thank you for your very fast reply. I got much farther now.