Difference between revisions of "LlDeleteSubList Sample"

From Second Life Wiki
Jump to navigation Jump to search
m (paramaters inversion)
Line 29: Line 29:




{{Sort|llDeleteSubList Sample}}{{LSLC|Library}}{{LSLC|Examples}}
{{Sort|llDeleteSubList Sample}}{{LSLC|Examples}}

Revision as of 06:58, 18 June 2007

/////////////////////////////
// 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, 3, 1);
        
        // Result:
        // list names = ["Edgar"];
    }
}