This sounds interesting, but I am not sure what you are trying to accomplish or why you need a switch case block to make decisions from two variables. Would it work to declare the variables statusTask and statusNumber before setup() to give them global scope, then initialize them in setup(), and then start the loop()? I like programming puzzles. Please give us more details regarding what you are trying to do. Thanks, MT.