Each case would be a goto back to a fixed label
Case 1
goto #labal1
case 2
goto #labal2
I admit it would need work to maintain it, cos every "gosub" to it would need its own case. But this was an edit statement about a solution that Dmaz sudjested, but which wouldnt work as originaly posted.
My entire take on this is that which I first posted, if you need a gosub (in a language that doesnt have gosub), its because youve designed your code badly.
Case 1
goto #labal1
case 2
goto #labal2
I admit it would need work to maintain it, cos every "gosub" to it would need its own case. But this was an edit statement about a solution that Dmaz sudjested, but which wouldnt work as originaly posted.
My entire take on this is that which I first posted, if you need a gosub (in a language that doesnt have gosub), its because youve designed your code badly.