Statement: Action, Type: Initial
Generate Random Number
Format: Generate Random Number from-integer to-integer dest-support-action
where
-
from-integer = any numeric variable. The value must be less than the value in to-integer.
-
to-integer = any numeric variable. The value must be greater than the value in from-integer.
-
dest-support-action = any one of the valid destination supporting action identifiers listed below:
-
any roulette table layout identifiers
Description
The Generate Random Number identifier generates a random number that is between from-integer and to-integer. The results is assigned to the value to the dest-support-action.
Formula
The mathematical formula for this action statement is: from-integer <= dest-support-action <= to-integer where dest-support-action is the integer value destination.
Example 1
Every time we initiate a new session, we want to wait for a certain number of spins to appear before we place bets on the roulette table. And we want the wait count to be different for each session. To do this, we create a data record wait count to contain the data value that will be created by a random generator. The following example will perform this task.
RX Script | Copy Code |
---|---|
While Starting a New Session begin Generate Random Number from 1 to 20 into Record "wait count" data end |
Results from example 1
Example 2
We want to place a random bet on the 2nd Dozen from 5 to 25 units on every spin. The following example will perform this task.
RX Script | Copy Code |
---|---|
Generate Random Number from 5 to 25 units into 2nd Dozen |