PL7 Pro - Shift Register

nisagnel Posted messages 1 Registration date   Status Member Last intervention   -  
 Maurice -
Hello,

I’m running into a small problem with PL7 Pro and I’d like to set up a register shift on an array of words.

Example:
On my array %MW1200:10 I want to find the command that can shift the words like this:
move %MW1200 into %MW1201
%MW1201 into %MW1202
%MW1202 into %MW1203
...etc
and %MW1209 into %MW1200

Does anyone know the command?
In the help I found how to do a shift but only for bit shifts of words.

Thanks

Configuration: Windows XP Opera 9.64

1 answer

  1. Maurice
     
    %MW5:=%MW1209;
    For %MW6:=1 to 9 do
    %MW7:=10-%MW6;
    %MW1200[%MW7]:=%MW1199[%MW7];
    END_FOR;
    %MW1200=%MW5;
    It's a loop, you just put the first value aside to restore it afterwards.
    There are also loops in while or other forms.
    This is structured.
    Good luck
    4