or destination array is too small?
#8

That gets the decimal though, not the character code which he's after. I suggest you add these little wrappers first:
PHP код:
minrandom(minmax)
    return 
random(max min) + min;

isOdd(number)
    return 
number 1// faster than mod 
Then you can easily use these wherever they are needed.

PHP код:
iKey[i] = isOdd(i) ? minrandom('1''9') : minrandom('a''z'); 
Reply


Messages In This Thread
or destination array is too small? - by SukMathcuck - 29.12.2016, 13:26
Re: or destination array is too small? - by SyS - 29.12.2016, 13:57
Re: or destination array is too small? - by Vince - 29.12.2016, 14:04
Re: or destination array is too small? - by SukMathcuck - 29.12.2016, 14:14
Re: or destination array is too small? - by Pablo098 - 29.12.2016, 15:01
Re: or destination array is too small? - by SukMathcuck - 29.12.2016, 15:06
Re: or destination array is too small? - by CutX - 29.12.2016, 16:09
Re: or destination array is too small? - by Vince - 29.12.2016, 16:19

Forum Jump:


Users browsing this thread: 1 Guest(s)