Which loop are you trying to break from when the value changes? Because nothing you're doing in the for loop has anything to do with checking to break on 144.

So, if we assume you mean the while loop, then yes, you either need to change status based on something you specifically change inside the loop some place, or, you need to make it volatile, so that it knows it's being changed by something else.


Quzah.