ListToWholeNumbers

From Second Life Wiki
Revision as of 05:53, 13 July 2008 by Chaz Longstaff (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Function: list ListToWholeNumbers(list mylist);

Removes one item from a list.

See also: Lists

<lsl> list ListToWholeNumbers(list myList) {

   list myConvertedList = [];
   integer ListLength = llGetListLength(myList);
   integer f = 0;
   while (f <= (ListLength - 1)) {
       string w =llList2Key(myList, f);
       integer y = (integer)w;
       myConvertedList = (myConvertedList=[]) + myConvertedList + y;
       f=f+1;
       }
   return myConvertedList;

}

</lsl>

list myWholeNumberList = ListToWholeNumbers(1.04,10.789,4.643); //yields [1,10,4]