Skip to main content
6 events
when toggle format what by license comment
Apr 28, 2020 at 16:09 vote accept Zaffresky
Apr 28, 2020 at 16:09 comment added Zaffresky Bingo. It works nicely :) Thanks
Apr 28, 2020 at 14:15 comment added Edgar Bonet @Zaffresky: Oops, my bad! The switch should be done on the selected operator, not on the analog value. I just edited the answer.
Apr 28, 2020 at 14:14 history edited Edgar Bonet CC BY-SA 4.0
Fix: switch on wrong variable
Apr 28, 2020 at 13:51 comment added Zaffresky Thanks a lot for your clear explanation. I fully agree that I was getting 0 occasionally due to circuit instability. I didn't know about do... while loops but now I do :) The program should have worked now but mysteriously the "ans" variable is not being updated by switch case. I tried it with if statements but it also doesn't work. I wonder what's causing this? P.s. I have uploaded the modified code in the original post.
Apr 27, 2020 at 16:59 history answered Edgar Bonet CC BY-SA 4.0