Switch & Case unclear to me
#3

What would you prefer?
pawn Код:
if( vehicleid == 0 || vehicleid == 2 || vehicleid == 4 || vehicleid == 6 || vehicleid == 8 || vehicleid == 10 || vehicleid == 12 || vehicleid == 14 || vehicleid == 16 || vehicleid == 18 || vehicleid == 20 )
{
    // Do something
}

// OR

switch( vehicleid )
{
    case 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20:
    {
        // Do something
    }
}
Reply


Messages In This Thread
Switch & Case unclear to me - by arjanforgames - 08.08.2013, 20:30
Re: Switch & Case unclear to me - by [XST]O_x - 08.08.2013, 20:40
Re: Switch & Case unclear to me - by Konstantinos - 08.08.2013, 20:43
Re: Switch & Case unclear to me - by arjanforgames - 09.08.2013, 06:03
Re: Switch & Case unclear to me - by Scenario - 09.08.2013, 06:11
Re: Switch & Case unclear to me - by Vince - 09.08.2013, 06:18
Re: Switch & Case unclear to me - by Misiur - 09.08.2013, 06:20
Re: Switch & Case unclear to me - by Scenario - 09.08.2013, 06:46

Forum Jump:


Users browsing this thread: 1 Guest(s)