Difference between revisions of "List"

From Second Life Wiki
Jump to navigation Jump to search
m (category added)
(add list of functions working with lists)
Line 3: Line 3:
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.
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:36, 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>]

The next functions are useful for working with list types: