OsListSortInPlaceStrided
From OpenSimulator
(Created page with "{{osslfunc |function_syntax=osListSortInPlaceStrided(list src, integer stride, integer stride_index, integer ascending) |threat_level=ignored |permissions=true |delay=0 |descr...") |
Revision as of 11:40, 26 April 2023
osListSortInPlaceStrided(list src, integer stride, integer stride_index, integer ascending)
| |
Identical to llListSortStrided but does the sort on the original list, so using less memory.
- Does nothing if the list length is not a multiple of stride. | |
Threat Level | This function does not do a threat level check |
Permissions | Use of this function is always allowed by default |
Extra Delay | 0 seconds |
Example(s) | |
// default { state_entry() { llSay(0, "osListSortInPlace example"); list src = [1,"D",-4,"A","B"]; llSay(0, "original list: " + llDumpList2String(src,",")); osListSortInPlace(src, 1, TRUE); llSay(0, "sorted in ascending order with stride 1: " + llDumpList2String(src,",")); src = [1,"D",-4,"A",0,"B"]; llSay(0, "original list: " + llDumpList2String(src,",")); osListSortInPlace(src, 2, 1); llSay(0, "sorted in ascending order with stride 2: " + llDumpList2String(src,",")); } } | |
Notes | |
This function was added in 0.9.3 |