Using goto with a bunch if conditions is deemed inefficient. You either use goto or if statements on its own sparingly. If I were you, I'd use goto in this fashion:
alias test {
goto $iif(!$1,$null,$iif($1 = 2,yes,no))
:no
echo -a blah!
halt
:yes
echo -a Aha!
halt
:error
echo -a * You didn't specify a number 1 or something else!
reseterror
}
You can put :yes or :no anywhere in the script. Goto jumps from point B to point A and vice versa.