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

Glossary Item Box

Record Layout Index

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

where

Description

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

When using the data record in a condition statement, the layout value of the Record Layout Index is 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 Record 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 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