Your thinking is right - a switch with a constant required at that point would
be useless.
No, it's not meant to be a constant. The items in the "case" lines need to be
constants, of course.
Are you sure it's the switch line it doesn't like? Compilers can get their
error messages a bit out of step sometimes.
You've obviously posted an indicative bit of code, not the real thing. I think
it might be better to post the real code.