User:Vegas Silverweb/Fastest And Probably Most Efficient Way To Reverse a List (in Mono)

From Second Life Wiki
< User:Vegas Silverweb
Revision as of 20:21, 20 April 2010 by Vegas Silverweb (talk | contribs) (Created page with 'As Seen in Scripts <lsl> list newlist; list oldlist = ["a","b","c"]; while(oldlist !=[]) {newlist+=llList2List(oldlist,-1,-1);oldlist = llDeleteSubList(oldlist,-1,-1);} // old...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

As Seen in Scripts

<lsl> list newlist; list oldlist = ["a","b","c"];

while(oldlist !=[]) {newlist+=llList2List(oldlist,-1,-1);oldlist = llDeleteSubList(oldlist,-1,-1);}

// oldlist is now empty, newlist is ["c","b","a"] </lsl>