justadude
(justadude)
September 18, 2019, 8:28pm
1
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.
SteveC
(Steve)
September 18, 2019, 8:38pm
2
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
(justadude)
September 18, 2019, 8:59pm
3
Thank you for your very fast reply. I got much farther now.