List: Difference between revisions

From Second Life Wiki
Jump to navigation Jump to search
add list of functions working with lists
substituied list of functions by List category
Line 1: Line 1:
{{LSL Header}}
{{LSL Header}}
[[Category: LSL Types]]
[[Category: LSL Types]]
[[Category: LSL List]]
A list is a special kind of data type which can contain zero or more elements of any other data type.  
A list is a special kind of data type which can contain zero or more elements of any other data type.  
Lists are signified by square brackets surrounding their elements, which are separated by commas.
Lists are signified by square brackets surrounding their elements, which are separated by commas.
Line 6: Line 7:
List examples:
List examples:
<pre>[0,1,2,3,4], ["Yes","No","Perhaps"], [1,14.154,"Isn't this fun?",<0,0,0>]</pre>
<pre>[0,1,2,3,4], ["Yes","No","Perhaps"], [1,14.154,"Isn't this fun?",<0,0,0>]</pre>
The next functions are useful for working with list types:
<div id="box"><div style="padding: 0.5em">
{|cellpadding=0 cellspacing=0
|-
{{LSLG|llCSV2List}}, {{LSLG|llDeleteSubList}}, {{LSLG|llGetListEntryType}}, {{LSLG|llGetListLength}}, {{LSLG|llList2CSV}}, {{LSLG|llList2Float}}, {{LSLG|llList2Integer}}, {{LSLG|llList2Key}}, {{LSLG|llList2List}}, {{LSLG|llList2ListStrided}}, {{LSLG|llList2Rot}}, {{LSLG|llList2String}}, {{LSLG|llList2Vector}}, {{LSLG|llListFindList}}, {{LSLG|llListInsertList}}, {{LSLG|llListRandomize}}, {{LSLG|llListSort}}, {{LSLG|llParseString2List}}
|}
</div>

Revision as of 05:44, 17 February 2007

A list is a special kind of data type which can contain zero or more elements of any other data type. Lists are signified by square brackets surrounding their elements, which are separated by commas.

List examples:

[0,1,2,3,4], ["Yes","No","Perhaps"], [1,14.154,"Isn't this fun?",<0,0,0>]