25-10-2013, 07:33 AM
I'm assuming that ADC1Flag has a volatile qualified type so that the act of reading its value it is a side-effect. That being the case, I think you have only two options: either nest the tests (as you did in your proposed solution), or perform the volatile access first, e.g.
[code]flag = ADC1Flag
[code]flag = ADC1Flag
<t></t>