drifterz
Newbie level 5
Hi,
I wish to implement a counter with a range say from 0 to 9. Is there a way to specify the range such that it will be only within the range 0 to 9? For example, if I use counter<=counter-1
The current counter value is 0 and I wish the subtraction to yield 9 instead of -1 automatically. Likewise when counter=9, counter + 1 will yield 0.
Is there a way to do this automatically without checking for it in the code using IF? TIA
I wish to implement a counter with a range say from 0 to 9. Is there a way to specify the range such that it will be only within the range 0 to 9? For example, if I use counter<=counter-1
The current counter value is 0 and I wish the subtraction to yield 9 instead of -1 automatically. Likewise when counter=9, counter + 1 will yield 0.
Is there a way to do this automatically without checking for it in the code using IF? TIA