redundant test: constant expression is non-zero
#5

Let's say you want to check if the carid is one of these:
pawn Код:
case 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410:
{
    // code..
}
Instead of writing all those numbers, you could just do:
pawn Код:
case 400 .. 410:
{
    // code..
}
and any number in between will be valid.
Reply


Messages In This Thread
redundant test: constant expression is non-zero - by Blademaster680 - 16.01.2014, 15:23
Re: redundant test: constant expression is non-zero - by Konstantinos - 16.01.2014, 15:27
Re: redundant test: constant expression is non-zero - by Blademaster680 - 16.01.2014, 15:39
Re: redundant test: constant expression is non-zero - by iZN - 16.01.2014, 15:41
Re: redundant test: constant expression is non-zero - by Konstantinos - 16.01.2014, 15:43
Re: redundant test: constant expression is non-zero - by Blademaster680 - 16.01.2014, 15:45

Forum Jump:


Users browsing this thread: 2 Guest(s)