So this "wrapping" is compiler related issue and can't be fixed, as I understand?
So this "wrapping" is compiler related issue and can't be fixed, as I understand?
Technically, I solved this problem by making I change between 5 and 260, and outputting HPWM 2,I-5,10000.
If you mean a compiler problem, no. It is not.
If you mean how binary arithmetic works, yes. That is how you count, add or subtract in binary having byte, word or other size variables. In any case that is how you do it in decimal also but do not give it much attention.
The "fix" is in the answers given already to you. SELECT CASE, test before updating for valid result, etc...
Ioannis
Bookmarks