From WikiChip
Difference between revisions of "mirc/identifiers/$rand"
< mirc‎ | identifiers

m
m
Line 26: Line 26:
 
{{mIRC compatibility|2.1a}}
 
{{mIRC compatibility|2.1a}}
  
== See Also ==
+
== See also ==
 
* {{mIRC|$r}}
 
* {{mIRC|$r}}
 
* {{mIRC|$v1}}
 
* {{mIRC|$v1}}

Revision as of 13:14, 22 September 2017

$rand returns a random number between v1 and v2. If you supply a value which is not a number, it uses its code point value as the number.

Note: This replaces the deprecated $r identifier.


Synopsis

$rand(value1,value2)

Parameters

value1 = the starting value

value2 = the ending value

Properties

None

Examples

//echo -a $rand(0,10)

will return a random number between 0 up to 10.

//echo -a $rand(A,Z)

will return a random upper case between A and Z.

Compatibility

Added: mIRC v2.1a
Added on: 28 Feb 1995
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See also

[Expand]
v · d · e mIRC identifier list