$Random Seed: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
Line 1: Line 1:
{{DISPLAYTITLE:$Random_SEED}}
{{DISPLAYTITLE:$Random_Seed}}
<span class="pageSubtitle"><section begin="desc" />Build seed specifying series of $RANDOM results<section end="desc" /></span>
<span class="pageSubtitle"><section begin="desc" />Build seed specifying series of $RANDOM results<section end="desc" /></span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Random_SEED function is [[to be entered]].</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 $RANDOM is reproducible.  
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.  
$Random_Seed accepts two required arguments and returns zero.  
Line 11: Line 11:


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.
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==
==Syntax==
<p class="syntax"><section begin="syntax" /> %RESULT = $Random_Seed(%SEED, seed_value)
<p class="syntax"><section begin="syntax" /> %RESULT = $Random_Seed(%SEED, seed_value)
Line 17: Line 18:
</p>
</p>
<p class="caption">%SEED is initialized for a series of $Random results that depends on '''seed_value'''.</p>
<p class="caption">%SEED is initialized for a series of $Random 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.  


See the description of $Random for examples of the use of $Random_Seed.
See the description of $Random for examples of the use of $Random_Seed.
<ul class="smallAndTightList">
<ul class="smallAndTightList">
<li>[[Sirius functions]]</li>
<li>[[Sirius functions]]</li>

Revision as of 20:49, 2 February 2011

<section begin="desc" />Build seed specifying series of $RANDOM results<section end="desc" />

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" />

$Random_Seed Function

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

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

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

Products authorizing $Random_Seed