switch(%var)
{
case number:
doStuff();
}
basically it switches what it does based on variable rather than alot of ifs, and case number: is what the number is, and then whatever else you want to do is after. Also, use case default: if none of the conditions are met for the cases
switch$(%var) is the same except that it switches based on strings.