theshamot
Hello, how is it possible that none of these lines will write to my variable and its value stays 0?
control is of type WORD
 
control := 1;
control := WORD#1;
control := UINT_TO_WORD(1);
control := USINT_TO_WORD(1);
control := BOOL_TO_WORD(TRUE);
control := BYTE_TO_WORD(1);
 
while this line works...
control := inputs;
where inputs is WORD variable too.
 
What I want to do is to toggle individual bits using XOR operator but I have found myself to be stuck on unability to write anything into variable. It this possible in any way?
 
....If it does not work why will compiler not find error?
Reply 0 0
theshamot
It was my stupid mistake. Mods can delete this post.
Reply 0 0
thiagoralves
I figured it was some sort of mistake. Just for the sake of this community's curiosity, what was it?
Reply 0 0
theshamot
I was overwriting first two bits later in the program but completely forgot that I even used that variable. And since I was testing by just writing 1 or 2 to that variable it seemed like it just does not write.
Reply 0 0
thiagoralves
🤦🏻‍♂️
It happens to all of us 🙂
Reply 0 0
Reply