$Random Seed: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
(Automatically generated page update)
 
(42 intermediate revisions by 4 users not shown)
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">Build seed specifying series of <var>$RANDOM</var> results</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 the [[RandomNumberGenerator class]].</p>
<p class="warn"><b>Note: </b>Many $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 <var>[[$Random]]</var>, so that the series of numbers returned by <var>$Random</var> is reproducible.  


$Random_Seed 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.
==Syntax==
<p class="syntax"><span class="term">%result</span> = $Random_Seed(%seed, seed_value)
</p>


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 terms===
<table class="syntaxTable">
<tr><th>%result</th>
<td>A zero, which indicates success.  
If any argument is invalid or omitted, the request is cancelled.
</td></tr>


==Syntax==
<tr><th>%seed</th>
<p class="syntax"><section begin="syntax" /> %RESULT = $Random_Seed(%SEED, seed_value)
<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. <var class="term">%seed</var> is initialized for a series of <var>$Random</var> results that depends on <var class="term">seed_value</var>.</td></tr>
<section end="syntax" /></p>
<p class="caption">$Random_Seed Function
</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.  
<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>


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


==Products authorizing {{PAGENAMEE}}==
<ul class="smallAndTightList">
<ul class="smallAndTightList">
<li>[[Sirius functions]]</li>
<li>[[List of $functions|Sirius functions]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Janus Open Client]]</li>
<li>[[Media:JoclrNew.pdf|Janus Open Client]]</li>
<li>[[Janus Open Server]]</li>
<li>[[Media:JosrvrNew.pdf|Janus Open Server]]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Web Server]]</li>
<li>[[Janus Web Server]]</li>
<li>[[Japanese functions]]</li>
<li>Japanese functions</li>
<li>[[Sir2000 Field Migration Facility]]</li>
<li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li>
 
</ul>
</ul>
<p class="caption">Products authorizing $Random_Seed
</p>




[[Category:$Functions|$Random_SEED]]
[[Category:$Functions|$Random_Seed]]

Latest revision as of 22:52, 20 September 2018

Build seed specifying series of $RANDOM results

Note: Many $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.

Syntax

%result = $Random_Seed(%seed, seed_value)

Syntax terms

%result A zero, which indicates success.

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

%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 is initialized for a series of $Random results that depends on seed_value.
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.

Examples

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

Products authorizing $Random_Seed