Page 1 of 1
Simple Program - Want to get state of some switches.
Posted: Sat Mar 29, 2025 11:33 pm
by Billduck1302
It does not recognise a Boolean NOT DG. When I fix it, with a space, it reverts to NOTDG, and as such, thinks it is a variable. It sees the same error when I step thru it with F8. I may be asleep at the wheel.
Thanks in advance.
Re: Simple Program - Want to get state of some switches.
Posted: Sun Mar 30, 2025 12:38 am
by chipfryer27
Hi
Try exclamation mark instead of the word NOT (!) as your operand
Regards
Re: Simple Program - Want to get state of some switches.
Posted: Sun Mar 30, 2025 12:49 am
by Billduck1302
I will add that !(Variable) works but not NOT(Variable)
Re: Simple Program - Want to get state of some switches.
Posted: Sun Mar 30, 2025 3:45 am
by medelec35
Hello.
If comparing variables, you need to use logical operators and not bitwise operators.
E.g
&& instead of & (or AND)
|| instead of | (or OR)
Note the pipe | is the key next to Z.
! instead of NOT as Chipfryer27 stated