Difference between revisions of "LlDeleteSubList Sample"

From Second Life Wiki
Jump to navigation Jump to search
(New page: <pre> ///////////////////////////// // Author: Bird Raven // For Use As OpenSource ///////////////////////////// default { state_entry() { // Create a list of names ...)
 
(Redirecting to LlDeleteSubList#Examples)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<pre>
#Redirect [[llDeleteSubList#Examples]]
/////////////////////////////
// Author: Bird Raven
// For Use As OpenSource
/////////////////////////////
default
{
    state_entry()
    {
        // Create a list of names
        list names = ["Anthony", "Bob", "Charlie", "Dan", "Edgar", "Gerald"];
       
        // Now let's remove values at position 1 through 2.
        names = llDeleteSubList(names, 1, 2);
 
        // Result:
        // list names = ["Anthony", "Dan", "Edgar", "Gerald"];
       
        // Now let's use an start number higher then our end number
        names = llDeleteSubList(names, 1, 3);
       
        // Result:
        // list names = ["Edgar"];
    }
}
</pre>

Latest revision as of 07:00, 18 June 2007