10.5.6.8. ArrayShift
10.5.6.8. ArrayShift
Explanation | This is used to move the data of the designated scope of a variable array space by space. Based on the array index of src1, move the src3–src4 array scope. For the last value of an array to move, insert 0 in the case of a number array, or null in the case of a string array. | ||
Syntax | ArrayShift <src1>,<src2>,<src3>,<src4> | ||
Parameter | src1 | Array name |
|
src2 | Data movement direction | 1: ascending order 0: descending order | |
src3 | Start index of array | V%, LV%, number | |
src4 | End index of array | V%, LV%, number | |
Example | 1. ArrayShift V10%, 1, 3, 5 => Set V%[15] to V%[14], V%[14] to V%[13], and V%[13] to 0. 2. ArrayShift gtTestArr,0,1,8 => Set gtTestArr[1] to gtTestArr[2], gtTestArr[2] to gtTestArr[3], and gtTestArr[8] to null. | ||
Version | Operation after the V40.23-04_20200730 version |