$Random Seed: Difference between revisions
m (moved $Random SEED to $Random Seed) |
mNo edit summary |
||
Line 13: | Line 13: | ||
==Syntax== | ==Syntax== | ||
<p class="syntax"><section begin="syntax" /> %RESULT = $Random_Seed(% | <p class="syntax"><section begin="syntax" /> %RESULT = $Random_Seed(%Seed, seed_value) | ||
<section end="syntax" /></p> | <section end="syntax" /></p> | ||
<p class="caption">$Random_Seed Function | <p class="caption">$Random_Seed Function | ||
</p> | </p> | ||
<p class="caption">% | <p class="caption">%Seed is initialized for a series of <var>$Random</var> results that depends on '''seed_value'''.</p> | ||
If any argument is invalid or omitted, the request is cancelled. | If any argument is invalid or omitted, the request is cancelled. | ||
Line 38: | Line 38: | ||
[[Category:$Functions|$ | [[Category:$Functions|$Random_Seed]] |
Revision as of 17:53, 19 October 2012
Build seed specifying series of $RANDOM results
Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Random_Seed function is the RandomNumberGenerator class.
This function sets a %variable or IMAGE item to a value that can be used by $Random, so that the series of numbers returned by $Random is reproducible.
$Random_Seed accepts two required arguments and returns zero.
The first argument is a %variable or IMAGE item to be set to a random number seed. This argument must be a string of length at least 144.
The second argument specifies a number that determines the $Random series. This argument must be greater than or equal to -1,000,000,000 and less than or equal to 1,000,000,000.
Syntax
<section begin="syntax" /> %RESULT = $Random_Seed(%Seed, seed_value) <section end="syntax" />
If any argument is invalid or omitted, the request is cancelled.
See the description of $Random for examples of the use of $Random_Seed.