switch(int) {
case int1:
code;
case int2:
code;
break;
default:
break;
}
The switch only takes int variables that I am aware of. If you do not use break at the end of the case, it will cascade through the rest of the cases after the first true case found. Default is what will happen if none of the cases evaluate to be true. If you already knew this and are asking in terms of Tribes (which seems likely), then I will tell you that I have never seen switch used or been able to make it work. You are stuck with lines of if(num==1) etc.