|
|
|
|
|
Random (Function) In french: Hasard Returns a random number. Remark: To obtain a random number that can be used with cryptographic technologies (recommended for security reasons), use the RandomCryptoInteger function..
ResHasard = Random()
ResHasard = Random(33)
ResHasard = Random(7, 21)
Syntax
Retrieving a random number included between 0 and 1 Hide the details
<Result> = Random()
<Result>: Real Random number included between 0 and 1.
Retrieving a random number included between 1 and a value Hide the details
<Result> = Random(<Upper bound>)
<Result>: Integer Random number included between 1 and a specified value (inclusive). <Upper bound>: Integer Upper bound of the number returned (value included between 1 and 2 147 483 647).
Retrieving a random number included between two values Hide the details
<Result> = Random(<Lower bound> , <Upper bound>)
<Result>: Integer Random number included between two specified values (inclusive). <Lower bound>: Integer Lower bound of the number returned (value included between 0 and 2 147 483 647). <Upper bound>: Integer Upper bound of returned number (value included between 0 and 2 147 483 647). Remarks The "pool" from which the random number is "chosen" can be initialized by InitRandom. If InitRandom is not called, the random values generated by Random will be the same for each program execution. Business / UI classification: Neutral code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|