The rule for a 'case' is compile- time constants, and variable 'b' isnt considered so, its assigned a value later hence not become compile time constant. You would have to declare and inialize the final variable in 1 line, like this:
variable a is given value at compilation time only so its compile time constant but variable b is not getting any value till it runs.so run time value assigned. so not comiple time constant
You guys haven't done this much, have ya? I suggest you study this tiny ad:
a bit of art, as a gift, the permaculture playing cards