From WikiChip
Difference between revisions of "mirc/identifiers/$rand"
(→Paramters) |
|||
Line 1: | Line 1: | ||
− | {{mirc title|$rand Identifier}}'''$rand(value1,value2)''' | + | {{mirc title|$rand Identifier}}'''$rand(value1,value2)''' 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. |
== Synopsis == | == Synopsis == | ||
Line 20: | Line 20: | ||
<source lang="mIRC">//echo -a $rand(0,10)</source> | <source lang="mIRC">//echo -a $rand(0,10)</source> | ||
− | + | will return a random number between 0 up to 10. | |
− | |||
− | |||
− | |||
− | |||
<source lang="mIRC">//echo -a $rand(A,Z)</source> | <source lang="mIRC">//echo -a $rand(A,Z)</source> | ||
− | + | will return a random upper case between A and Z. | |
== Compatibility == | == Compatibility == |
Revision as of 11:25, 12 June 2017
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
$rand(value1,value2) 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.
Synopsis
$rand(value1,value2)
Paramters
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.