ListStridedMove

From Second Life Wiki

Second Life Wiki > LSL Portal > Examples > ListStridedMove
Jump to: navigation, search

Template:Needs Translation/LSL/de Template:Needs Translation/LSL/es Template:Needs Translation/LSL/el Template:Needs Translation/LSL/fr Template:Needs Translation/LSL/he Template:Needs Translation/LSL/it Template:Needs Translation/LSL/ja Template:Needs Translation/LSL/ko Template:Needs Translation/LSL/nl Template:Needs Translation/LSL/hu Template:Needs Translation/LSL/no Template:Needs Translation/LSL/da Template:Needs Translation/LSL/sv Template:Needs Translation/LSL/tr Template:Needs Translation/LSL/pl Template:Needs Translation/LSL/pt Template:Needs Translation/LSL/ru Template:Needs Translation/LSL/uk Template:Needs Translation/LSL/zh-Hans Template:Needs Translation/LSL/zh-Hant

Contents

Summary

Function: list ListStridedMove( list myList, integer start, integer end, integer stride, integer target );

Moves a stride from one position to another position.
Returns a list that contains the elements of myList but with the strides in the range of start to end moved to the stride position target.

• list myList
• integer start
• integer end
• integer stride
• integer target

list ListStridedMove(list myList, integer start, integer end, integer stride, integer target) {
    if(stride <= 0) stride = 1;
    list item = llList2List(myList, start *= stride, end = ((stride * (end + 1)) - 1));
    return llListInsertList(llDeleteSubList(myList, start, end), myList = item, target * stride);
}

See also: Strided Lists

Examples

Deep Notes

Personal tools
In other languages