alias elseif.test {
var %count = 0
if 1 == 1 { inc %count }
if 1 == 1 { inc %count }
if 1 == 1 { inc %count }
if 1 == 1 { inc %count }
if 1 == 1 { inc %count }
echo -a * If: %count
%count = 0
if 1 == 1 { inc %count }
elseif 1 == 1 { inc %count }
elseif 1 == 1 { inc %count }
elseif 1 == 1 { inc %count }
elseif 1 == 1 { inc %count }
elseif 1 == 1 { inc %count }
echo -a * ElseIf: %count
}
/elseif.test* If: 5
* ElseIf: 1
They are not at all the same thing. In the IF section, each IF is evaluated every single time, incrementing %count every time. In the ElseIf section, since the first IF condition is true, the 1 inc %count command is executed and then control drops out of the if-elseif-else control structure.