raw *:*:{
goto $numeric {
:001
;dostuff for numeric 001
goto end
:002
;dostuff for numeric 002
goto end
;more numerics here!
:error
if (? /goto: * iswm $error) reseterror
:end
}
}
i like the extra { } to make it more legible
here's a simpler alternative to the error handling though, with a couple of small changes that seemed more intuitive to me:
raw *:*:{
var %e = $event
goto %e {
:001
;dostuff for numeric 001
return
:002
;dostuff for numeric 002
return
;more numerics here!
:%e
}
}
$event so it'll support non numeric ones too, just in case :X