quick question about switch(rand(1,30))
Well I never really looked up switch in the ref before so I decided to do it because I thought it could be the cause to why my proc wasn't working...
and it says ...
"The "switch" instruction is a compact notation for a lengthy "else-if" chain."
else-if
so that means if I had an if() statement before the switch and it was true it would call it and not call the switch?
just a possibility?
is there any other way to do this...
switch(rand(1,30))
if(1,10)
if(11,12)
etc?
ID:266699
![]() May 28 2002, 12:23 pm
|
|
weird!!!
because puting 1,10 used to mean 1 to 10, or atleast that's how it used to work!! Weird... ok cool thanks |
There is an example of this in the reference but if you wanted you could do: something to something. Example:
The first uses a range and the second uses specific values.