6 Replies
instead of semicolon, it's colon after the case
example
Oh, why is that?
It's just how they designed the language. It is used to distinguish the case labels from code blocks
Yes in switch case use break with
Without adding break at end of your switch method, you will likely encounter error e.g
Switch(later)
{
case( ToString) foreground: return speed *1; break;
case etc
..
...
default: return speed *1; break;
}
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.