Quote:
Originally Posted by Cubical
It was mainly just for my curiosity because I don't even have Graal installed right now. I was wondering for something along the lines of this.
PHP Code:
switch(cmd){ case "command1": break; case "command2": break; case "help": default: // if help or no params are given then continue sendtorc("commandlist"); break; }
|
Best way is to do it like this, as suggested in original post:
PHP Code:
switch (cmd) {
case "command1":
case "command2":
dostuff;
break;
default:
domorestuff;
}
either command1 or command2 will activate "dostuff;" and doesn't really hurt readability.