12.08.2010, 10:17
Hello, maybe someone can explain, what a different between
and
? (:
Thanks,
-Aivaras.
pawn Code:
if
pawn Code:
else if
Thanks,
-Aivaras.
if
else if
new
iStatement = 2
if(iStatement == 0)
{
/*
This wouldn't be executed, because iStatement is 2.
*/
}
else if(iStatement == 1)
{
/*
This wouldn't be executed, because iStatement is 2.
*/
}
else if(iStatement == 2)
{
/*
This will be executed, because iStatement is 2, and there's a match.
*/
}
new
iStatement = 2
if(iStatement == 0)
{
/*
This wouldn't be executed, because iStatement is 2.
*/
}
else
{
if(iStatement == 1)
{
/*
This wouldn't be executed, because iStatement is 2.
*/
}
else
{
if(iStatement == 2)
{
/*
This will be executed, because iStatement is 2, and there's a match.
*/
}
}
}