Statement: Condition, Type: Supporting
Record
Format: initial-condition-statement Record "record-name" record-extension
where
-
initial-condition-statement = any valid condition statement that use these identifiers listed below
-
record-name = the text name of the data record enclosed in quotation marks " " that will used to reference this record.
-
record-extension = either one of the valid identifier extensions listed below:
Description
The Record identifier reads the record-name and creates a data record if it does not already exist. The Record can then be used to store values from the data and layout fields. The Record is used in conjunction the record-extension identifiers to access the values and compared the value against another supporting condition identifier to produce a logical true or false result. When the outcome of the condition is evaluated as true the program control is passed to the body of the condition block.
For more information, see Data Records.
Example 1
We want to determine if our win goal have been met by 25 units and if so, display a message to the user and stop the session. If the data value of record win goal has exceeded 25 units, the condition statement will be evaluated as true and the action statements will be executed. The following example will perform this task.
RX Script | Copy Code |
---|---|
While Record "win goal" data > 25 units begin Display "You have reached your win goal." Stop Session end |
Example 2
We store the last even money Red, Black that appears to the Layout value of data record last color. Using that information, we place a progression bet on that layout. A condition statement is used to determine if the data record last color has won. If the condition is true (our bet was won), we will reset our progression unit back 1. The following example will perform this task.
RX Script | Copy Code |
---|---|
If Record "last color" layout has won each time begin Put 1 unit on Record "progression" data end |