mIRC Homepage
Posted By: maroon $rand range includes negative numbers - 09/11/18 05:21 AM
Allow $rand(-10,10) to return a number from the range -10 through +10, and $rand(-20,-10) to return a number from the range -20 through -10.

$rand currently treats a negative number as if text, so $rand(-4,5) is $null and $rand(-4,Z) is $chr($asc(-)) thru $chr($asc(Z)) instead of $null. $rand(-20,-10) always returns hyphen because it's the same as $rand(-,-)
Posted By: westor Re: $rand range includes negative numbers - 09/11/18 01:35 PM
Nice and useful idea! +1
© mIRC Discussion Forums