We are about to switch to a new forum software. Until then we have removed the registration on this forum.
so in Arduino, for values of 0-9, you would type this:
switch(testVar){
case '0'...'9'://any numbers from 0-9 are processed the same way.
do something;
break;
how do I do the exact same thing in Processing?
Thanks!
Answers
Arduino uses C language. In Java or JS, you can do similar w/ a chained
case
like this:Or use an
if
block like this:did you check the reference?: http://processing.org/reference/switch.html
Mmm, this isn't even C syntax, unless it is a recent (C99? not so recent, but I haven't coded C in a long time) feature.
OK thanks very much!