Roulette Xtreme 2.0 - System Designer
Loop Until
Identifier Index > L > Loop Until

Glossary Item Box

Loop Until

Format:  Loop Until  support-condition  { support-condition, support-condition, support-condition }
                begin-identifier



                end-identifier

where

  • support-condition = one or more of any valid series of supporting condition identifiers to complete a condition statement.

  • begin-identifier = the begin keyword identifier to denote the beginning of a condition block

  • end-identifier = the end keyword identifier to denote the end of a condition block.

Description

The Loop Until identifier is similar to the While identifier except for two items:

  1. if the outcome is evaluated as false, the program control is passed to the body of the condition block

  2. program control is always return back to the beginning of the condition block until the outcome is evaluated as true.  

The Loop Until identifier reads the initial support-condition to build a condition statement.  Depending on the initial support-condition one or more supporting condition identifiers may be required.  Once all required support-conditions are read and validated by the compiler, a condition block is created that contains two logical outcomes: true or false.  

When the outcome of the condition is evaluated as false the program control is passed to the body of the condition block.  From there, the system will then execute all action and condition statements inside the condition block until the end-identifier.  At this point, program control returns back to the begin-identifier of the condition block and repeats the same process until the outcome is evaluated as true.  This is performed by using some action statement that would alter the outcome of the condition block to true.  Once the outcome of the condition is evaluated as true, the program control will completely skip the entire condition block and program control will be passed to the location just past the end-identifier of the condition block.

There are two instances that will cause the Loop Until to be evaluated as true and end the loop cycle:

  1. Exit identifier.  When this is encountered inside the Loop Until block, the program control will be passed back to the main view awaiting for another spin to be processed.  

  2. Return identifier.  When this is encountered inside the Loop Until block, the program control is passed back to the original calling point

Example

We are tracking several roulette numbers in the data record tracked spin list.  Once we have our tracked numbers, we want to place a 5 unit bet on each of the numbers.  This is performed by creating a Loop Until condition block to cycle through and place a bet on each of the numbers.  The loop will continue until the layout index of the data record exceeds the total count of items in the list.  The following example will perform this task.

RX Script Copy Code
Loop until Record "tracked spin list" layout index >
           Record "tracked spin list" layout count
begin
  Put 5 units on Record "tracked spin list" layout
  
  //add 1 to layout index to alter the outcome of the Loop until condition
  Add 1 to Record "tracked spin list" layout index
end

Copyright © 2003 UX Software. All rights reserved