CASE usage
I quite understand the manual entry about CASE.
I wonder if somebody give me a couple of examples of the use of CASE.
I really appeciate.
I wonder if somebody give me a couple of examples of the use of CASE.
I really appeciate.

Comments
case kb.getkey $C0: on_time := on_time - 10 #>14 ' Left arrow (limited to 14 clock cycles min) $C1: on_time := on_time + 10 ' Right arrow $C2: off_time := off_time + 10 ' Up arrow $C3: off_time := off_time - 10 #>57 ' Down arrow (limited to 57 clock cycles min)This is from the object that produces pulses that I posted:
http://forums.parallax.com/forums/default.aspx?f=25&m=139628
it gets the code for the key pressed using the getkey method and compares it to $C0 to $C3 in turn. If for example the key was the right arrow, kb.getkey would be $C1 and the code "on_time := on_time + 10 " would be run.
Once one of the cases is found to be true no others are checked and it jumps to the next part of the program.
Graham