My program have 4 directional switches with the value shown below:
up = -2
right = -3
down = -5
left = -9
I'll to write something like........
switch = read_switch();
count = 1;
Is it possible to limit the count between 1 and 3 (mimimum is 1 and maximum is 3 no matter how many 'left' or 'right' i press), so that the program will display something. Cause if i don't limit 'count', 'count' will also increase/decrease by the amount of time i pressed.
Value of count does no change when i press 'up' or 'down'.
Hope you get wat i mean
Thanks in advance