Roulette Xtreme 2.0 - System Designer
Move List Down
Identifier Index > M > Move List Down

Glossary Item Box

Move List Down

Format:  Move List Down  integer  dest-support-action

where

Description

The Move List Down identifier will shift all items located in the dest-support-action identifier to the right by the value of integer.  The last item in the list will be removed.  The action statement is used when you want to keep a rolling count of layout items or data items in a data record.

Example

We are keeping track of the last 5 roulette numbers in a data record spin list.  We only want to keep track of the last 5 numbers that have appeared. When the data record spin list has more than 5 items in the layout list, we will use the Move List Down and shift the items to the right by 1 and set the Layout index to the maximum number of items.  The next time a number appears, it will be inserted to the first position of the data record spin list. The following example will perform this task.

RX Script Copy Code
If Record "spin list" layout count > 4 then
begin
  Move List Down by 1 of the items located in Record "spin list" layout
  Put 0 on Record "spin list" layout index
end

Add 1 on Record "spin list" layout index
Copy last Number to Record "spin list" layout

Results from example

Copyright © 2003 UX Software. All rights reserved