Statement: Action, Type: Initial
Move List Up
Format: Move List Up integer dest-support-action
where
-
integer = any numeric variable
-
dest-support-action = any one of the valid destination supporting action identifiers listed below:
Description
The Move List Up identifier will shift all items located in the dest-support-action identifier to the left by the value of integer. The first 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 Up and shift the items to the left by 1 and set the Layout index to the maximum number of items. The next time a number appears, it will be appended to the last position of the data record. The following example will perform this task.
RX Script | ![]() |
---|---|
Add 1 on Record "spin list" layout index Copy last Number to Record "spin list" layout If Record "spin list" layout count > 5 then begin Move List Up by 1 of the items located in Record "spin list" layout Set max to Record "spin list" layout index end |