Difference between revisions of "ListStridedRemove"
Jump to navigation
Jump to search
(New page: {{LSL Header}} __NOTOC__ <div id="box"> == Function: list ListStridedRemove(list {{LSL Param|src}}, integer {{LSL Param|start}}, integer {{LSL Param|end}}, integer {{L...) |
m (style) |
||
Line 1: | Line 1: | ||
{{ | {{LSL_Function | ||
|mode=user | |||
== | |func=ListStridedRemove | ||
|p1_type=list|p1_name=src | |||
= | |p2_type=integer|p2_name=start | ||
|p3_type=integer|p3_name=end | |||
Removes a specified part of a strided list. | |p4_type=integer|p4_name=stride | ||
|return_type=list | |||
|return_text=that contains the elements of '''myList''' but with the strides in the range of '''start''' to '''end''' removed. | |||
|func_desc=Removes a specified part of a strided list. | |||
|func_footnote= | |||
<lsl>list ListStridedRemove(list src, integer start, integer end, integer stride) { | |||
return llDeleteSubList(src, start * stride, (stride * (end + 1)) - 1); | |||
}</lsl> | |||
See also: [[List#Strided_lists|Strided Lists]] | See also: [[List#Strided_lists|Strided Lists]] | ||
|examples= | |||
<lsl> | <lsl>list customers = ListStridedRemove(customers, 0, 0, STRIDELENGTH);</lsl> | ||
|spec | |||
|helpers | |||
|also_functions | |||
|also_events | |||
list customers = ListStridedRemove(customers, 0, 0, STRIDELENGTH); | |also_tests | ||
</lsl> | |also_articles | ||
|notes | |||
|cat1=Examples | |||
|cat2 | |||
|cat3 | |||
|cat4 | |||
}} |
Revision as of 17:32, 14 July 2008
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: list ListStridedRemove( list src, integer start, integer end, integer stride );
Removes a specified part of a strided list.
Returns a list that contains the elements of myList but with the strides in the range of start to end removed.
• list | src | |||
• integer | start | |||
• integer | end | |||
• integer | stride |
<lsl>list ListStridedRemove(list src, integer start, integer end, integer stride) {
return llDeleteSubList(src, start * stride, (stride * (end + 1)) - 1);
}</lsl>
See also: Strided Lists
Examples
<lsl>list customers = ListStridedRemove(customers, 0, 0, STRIDELENGTH);</lsl>