Difference between revisions of "ListStridedMove"
Jump to navigation
Jump to search
Ninjafoo Ng (talk | contribs) (Corrected fucntion variable names (target used in fucn definition, destination used in function)) |
Ugleh Ulrik (talk | contribs) |
||
Line 26: | Line 26: | ||
|notes | |notes | ||
|cat1=Examples | |cat1=Examples | ||
|cat2 | |cat2=UD_Functions | ||
|cat3 | |cat3 | ||
|cat4 | |cat4 | ||
}} | }} |
Revision as of 10:43, 25 May 2010
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
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 |
<lsl>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);
}</lsl>
See also: Strided Lists