RandomNumberGenerator methods syntax: Difference between revisions
Jump to navigation
Jump to search
m (Automatically generated page update) |
m (Automatically generated page update) |
||
(One intermediate revision by the same user not shown) | |||
Line 4: | Line 4: | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top:1px solid;"><span class="term">%outRandomNumberGenerator</span><span class="literal"> =</span> <span class="term">randomNumberGenerator</span><span class="literal">:[[Copy (RandomNumberGenerator function)|Copy]]</span></p> | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top:1px solid;"><span class="term">%outRandomNumberGenerator</span><span class="literal"> =</span> <span class="term">randomNumberGenerator</span><span class="literal">:[[Copy (RandomNumberGenerator function)|Copy]]</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%outRandomNumberGenerator</span><span class="literal"> =</span> <span class="term">randomNumberGenerator</span><span class="literal">:[[DeepCopy (RandomNumberGenerator function)|DeepCopy]]</span></p> | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%outRandomNumberGenerator</span><span class="literal"> =</span> <span class="term">randomNumberGenerator</span><span class="literal">:[[DeepCopy (RandomNumberGenerator function)|DeepCopy]]</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%randomNumberGenerator</span><span class="literal"> =</span> <span class="literal">%(RandomNumberGenerator):[[New (RandomNumberGenerator constructor)|New]]</span><span class="squareb">[</span><span class="literal">(</span> <span class="squareb">[</span><span class="literal" title="String">Seed=</span> <span class="term" title="String">string</span><span class="squareb">]</span><span class="comma">,</span> - | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%randomNumberGenerator</span><span class="literal"> =</span> <span class="squareb">[</span><span class="literal">%(RandomNumberGenerator):</span><span class="squareb">]</span><span class="literal">[[New (RandomNumberGenerator constructor)|New]]</span><span class="squareb">[</span><span class="literal">(</span> <span class="squareb">[</span><span class="literal" title="String">Seed=</span> <span class="term" title="String">string</span><span class="squareb">]</span><span class="comma">,</span> - | ||
<span class="squareb">[</span><span class="literal" title="String">Salt=</span> <span class="term" title="String">string</span><span class="squareb">]</span><span class="literal">)</span><span class="squareb">]</span></p> | <span class="squareb">[</span><span class="literal" title="String">Salt=</span> <span class="term" title="String">string</span><span class="squareb">]</span><span class="literal">)</span><span class="squareb">]</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">randomNumberGenerator</span><span class="literal">:[[UpdateSeed (RandomNumberGenerator subroutine)|UpdateSeed]]</span><span class="squareb">[</span><span class="literal">(</span> <span class="squareb">[</span><span class="literal" title="String">Seed=</span> <span class="term" title="String">string</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="String">Salt=</span> <span class="term" title="String">string</span><span class="squareb">]</span><span class="literal">)</span><span class="squareb">]</span></p> | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">randomNumberGenerator</span><span class="literal">:[[UpdateSeed (RandomNumberGenerator subroutine)|UpdateSeed]]</span><span class="squareb">[</span><span class="literal">(</span> <span class="squareb">[</span><span class="literal" title="String">Seed=</span> <span class="term" title="String">string</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="String">Salt=</span> <span class="term" title="String">string</span><span class="squareb">]</span><span class="literal">)</span><span class="squareb">]</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%number</span><span class="literal"> =</span> <span class="term">randomNumberGenerator</span><span class="literal">:[[Value (RandomNumberGenerator function)|Value]]</span><span class="squareb">[</span><span class="literal">(</span> <span class="squareb">[</span><span class="term" title="Number">min</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="term" title="Number">max</span><span class="squareb">]</span><span class="literal">)</span><span class="squareb">]</span></p> | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%number</span><span class="literal"> =</span> <span class="term">randomNumberGenerator</span><span class="literal">:[[Value (RandomNumberGenerator function)|Value]]</span><span class="squareb">[</span><span class="literal">(</span> <span class="squareb">[</span><span class="term" title="Number">min</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="term" title="Number">max</span><span class="squareb">]</span><span class="literal">)</span><span class="squareb">]</span></p> |
Latest revision as of 20:50, 30 November 2011
The syntax for each of the RandomNumberGenerator class methods is shown below.
Square brackets indicate optional elements of the method invocation. See also the notation conventions for methods and the List of RandomNumberGenerator methods.
%outRandomNumberGenerator = randomNumberGenerator:Copy
%outRandomNumberGenerator = randomNumberGenerator:DeepCopy
%randomNumberGenerator = [%(RandomNumberGenerator):]New[( [Seed= string], - [Salt= string])]
randomNumberGenerator:UpdateSeed[( [Seed= string], [Salt= string])]
%number = randomNumberGenerator:Value[( [min], [max])]