What's difference between these ? -
AnonScripter - 14.01.2014
What's difference between this ..
pawn Код:
case 17,18,19,20,21,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,48,49,50,51,52,53,54,55,56,57,58,59,60:
and This:
Re: What's difference between these ? - Patrick - 14.01.2014
Quote:
Originally Posted by AnonScripter
What's difference between this ..
pawn Код:
case 17,18,19,20,21,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,48,49,50,51,52,53,54,55,56,57,58,59,60:
and This:
|
Nothing different, just a shorten version of the other code, they work the same, I am not really sure about speed, but nothing is different on those code.
Re: What's difference between these ? -
BullseyeHawk - 14.01.2014
Insted of doing the whole numbers, for example
case 1,2,3,4,5,6,7,8,9,10:
You can short it so it would run the same as above /\
case 1 .. 10:
It basicly says, if the number is from 1 to 10 including 1 and 10. Then do this.
You can also do this with it(examples):
Quote:
case 0 .. 10:
case 0,1,2,3,4,5,6,7,8,9,10
case 0 .. 1, 2, 3, 4, 5 .. 10
|
You can play with it as you please.
Re: What's difference between these ? -
AnonScripter - 14.01.2014
thank you