Talk:LlList2ListStrided

From Second Life Wiki
Revision as of 08:11, 8 January 2012 by Kira Komarov (talk | contribs) (Created page with "Having some problems with this one, the page says: "To get every second element in a "collection of data" in a strided list:" <lsl>llList2ListStrided(llDeleteSubList(src, 0, 0),…")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Having some problems with this one, the page says:

"To get every second element in a "collection of data" in a strided list:" <lsl>llList2ListStrided(llDeleteSubList(src, 0, 0), 0, -1, 3);</lsl>

However that does not seem right, the last stride 3 should be a stride 2.

With an input list:

0.250000,a,0.250000,b,0.250000,c,0.250000,d

and using stride 3 instead of stride 2, I get:

a,0.250000,d

Using: <lsl>llList2ListStrided(llDeleteSubList(src, 0, 0), 0, -1, 2);</lsl> with a stride of 2 at the end instead, I get the expected result:

abcd

It makes sense to me: we are returning just the second element, so there is no need for a stride of 3, but rather a stride of 2 and the first element deleted.

I have changed it on the page, if I am wrong, please change it back.

Kira Komarov 07:11, 8 January 2012 (PST)