Roulette Xtreme 2.0 - System Designer
Record Layout Count (Condition)
Identifier Index > R > Record Layout Count (Condition)

Glossary Item Box

Record Layout Count

Format:  initial-condition-statement  Record  "record-name"  Layout Count  { support-condition  dest-support-condition }

where

Description

The Record Layout Count identifier reads the record-name and creates a data record if it does not already exist.  When referring to the Record Layout Count, you always identify the data record by its record-name which is inserted between the Record and Layout Count identifiers; i.e. Record "record-name"  Layout Count. This instructs the designed system that you are referencing the total number of roulette layout items in the layout field of the record.

When using the data record in a condition statement, the Record Layout Count identifier returns the total number of roulette layout items in the layout field.  This value is then compared 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

We want to track the last 5 roulette numbers that have appeared and place bets on those numbers.  After each spin, we cycle through the data record last 5 numbers using the layout index to review each roulette number and determine the status of that number.  If the status of the number has won, we increase the bet by 1 unit.  If the status of the number is a loss, we keep same unit bet.  The Loop Until condition statement performs a comparison between the data index pointer and the total number of items in the layout list.  The loop process will stop when the data index exceeds the Record Layout Count value.  The following example will perform this task.

RX Script Copy Code
Loop Until the Record "last 5 numbers" layout index > the Record "last 5 numbers" layout count
begin
  if Record "last 5 numbers" layout has won each time
  begin
    Add 1 unit to Record "last 5 numbers" layout
  end
  
  Add 1 unit to Record "last 5 numbers" layout index
end

Copyright © 2003 UX Software. All rights reserved