View Single Post
  #16  
Old 10-07-2010, 06:45 AM
Cubical Cubical is offline
Banned
Join Date: Feb 2007
Posts: 1,348
Cubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant future
Quote:
Originally Posted by fowlplay4 View Post
You can do that like this..

PHP Code:
  switch(blah){
    case 
"blah": case "blah2":
      
doStuff();
      break;
    case 
"blah3": default:
      
doStuff();
      break;
  } 
Drops read-ability quite a bit imo though.
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;