Originally Posted By: argv0
why not just do

Code:
if ($1 == 001) { echo -a we got 001 }
elseif ($1 == 002) { echo -a we got 002 }


Anyone who says "but that's so much more code!" probably also believes in Santa Claus. It only starts becoming "more" after 10 cases at least, and anything more than 10 cases shouldn't even be a case switch anymore in mIRC-- there are many better ways to code a decision list for large decision item lists.



I'm using it to display all error messages in a large script

Originally Posted By: hixxy
You can use default cases with your method like this:

Code:
var %a = $1
goto %a
 :001
  { return we got 001 | goto break }
 :002
  { echo -a Something else | goto break }
 :%a
  { default case code here }
 :break


Very nice idea... Dont know why I didnt think of that... Imma use it :P


[02:16] * Titanic has quit IRC (Excess Flood)