Difference between revisions of "LlListInsertList"

From Second Life Wiki
Jump to navigation Jump to search
(caveat)
Line 6: Line 6:
|return_text=that is '''src''' inserted into '''dest''' at position '''start'''.
|return_text=that is '''src''' inserted into '''dest''' at position '''start'''.
|spec
|spec
|caveats=If start is larger than the number of elements in src, then dest is appended on the end, not where you asked it to be.  To avoid this, create empty elements in the list first.
|caveats=*If '''start''' is past the end of '''src''', then '''dest''' is appended to th end of '''src''', it will not add null entries.  To avoid this, create empty elements in the list first. A similar outcome occurs when using {{LSLGC|Negative Index|negative indexes}}.
|constants
|constants
|examples
|examples
|helpers
|helpers
|also_functions=*{{LSLG|llDeleteSubList}}
|also_functions={{LSL DefineRow|[[llDeleteSubList]]}}
*{{LSLG|llList2List}}
{{LSL DefineRow|[[llList2List]]}}
*{{LSLG|llListReplaceList}}
{{LSL DefineRow|[[llListReplaceList]]}}
|also_events
|also_events
|also_tests
|also_tests

Revision as of 20:36, 16 April 2007

Summary

Function: list llListInsertList( list dest, list src, integer start );
0.0 Forced Delay
10.0 Energy

Returns a list that is src inserted into dest at position start.

• list dest
• list src
• integer start

start supports negative indexes.

Specification

Index Positive Negative
First 0 -length
Last length - 1 -1

Indexes

  • Positive indexes count from the beginning, the first item being indexed as 0, the last as (length - 1).
  • Negative indexes count from the far end, the first item being indexed as -length, the last as -1.

Caveats

  • If start is out of bounds the script continues to execute without an error message.
  • If start is past the end of src, then dest is appended to th end of src, it will not add null entries. To avoid this, create empty elements in the list first. A similar outcome occurs when using negative indexes.

Examples

See Also

Functions

• llDeleteSubList
• llList2List
• llListReplaceList

Articles

•  Negative Index

Deep Notes

Signature

function list llListInsertList( list dest, list src, integer start );