Home > other > Use KEIL compile V5 C51 program, a magical thing happened...
Use KEIL compile V5 C51 program, a magical thing happened...
Time:10-10
Else if (JIN3 & amp; & F_jin3==0) { }
Else if ((JIN3 & amp; & F_jin3==0)) { }
This article and the following article, compilation, burn into the MCU, the execution result unexpectedly is different, there are a great god know why? I compare the two kinds of writing compiled HEX file and LST, did not find what is the different place, it's very strange.
CodePudding user response:
The two write exactly the same, the original poster didn't write wrong?
CodePudding user response:
==priority than & amp; & High, syntax that's right, the logic is wrong, in addition, the comparison will be constant (0) in your code to the left of the==it's a good habit, at least not your problems