$Random Seed: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
Line 4: Line 4:
<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Random_Seed function is the [[RandomNumberGenerator class]].</p>
<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Random_Seed function is the [[RandomNumberGenerator class]].</p>


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 <var>$Random</var> is reproducible.  
This function sets a %variable or IMAGE item to a value that can be used by <var>[[$Random]]</var>, so that the series of numbers returned by <var>$Random</var> is reproducible.  


<var>$Random_Seed</var> accepts two required arguments and returns zero.  
<var>$Random_Seed</var> 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.
is initialized for a series of <var>$Random</var> results that depends on '''seed_value'''.</p>
 
The second argument specifies a number that determines the <var>$Random</var> 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==
==Syntax==
Line 16: Line 14:
<section end="syntax" /></p>
<section end="syntax" /></p>


<p class="caption">%seed is initialized for a series of <var>$Random</var> results that depends on '''seed_value'''.</p>
===Syntax terms===
<table class="syntaxTable">
<tr><th>%result</th>
<td>A %variable or IMAGE item to be set to a random number seed. This argument must be a string of length at least 144. </td></tr>
 
<tr><th>%seed</th>
<td>A %variable or IMAGE item to be set to a random number seed. This argument must be a string of length at least 144. </td></tr>
 
<tr><th>seed_value</th>
<td>A number that determines the <var>$Random</var> series. This argument must be greater than or equal to -1,000,000,000 and less than or equal to 1,000,000,000.</td></tr>
</table>


If any argument is invalid or omitted, the request is cancelled.  
If any argument is invalid or omitted, the request is cancelled.  


==Examples==
See the description of <var>$Random</var> for examples of the use of <var>$Random_Seed</var>.
See the description of <var>$Random</var> for examples of the use of <var>$Random_Seed</var>.


<ul class="smallAndTightList">
<ul class="smallAndTightList">

Revision as of 21:31, 24 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.

is initialized for a series of $Random results that depends on seed_value.

Syntax

<section begin="syntax" />%result = $Random_Seed(%seed, seed_value) <section end="syntax" />

Syntax terms

%result A %variable or IMAGE item to be set to a random number seed. This argument must be a string of length at least 144.
%seed A %variable or IMAGE item to be set to a random number seed. This argument must be a string of length at least 144.
seed_value 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.

If any argument is invalid or omitted, the request is cancelled.

Examples

See the description of $Random for examples of the use of $Random_Seed.


Products authorizing $Random_Seed