Talk:LlList2ListStrided
Revision as of 11:30, 8 January 2012 by Strife Onizuka (talk | contribs)
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)
- There are a few problems with the article:
- A sample value of src was not provided.
- A description of src was not provided.
- The example fails to correlate the value 3 with any requirement for the structure of src or that it is important.
- For your example, using a strided list where the stride is 2 (and not 3) you need to set the llList2ListStride stride parameter as 2 (and not 3).
- Since fixing the example to match your usecase isn't going to help anyone with a say a stride of 4 we need to fix the example as to remove all underlying confusion. -- Strife (talk|contribs) 11:30, 8 January 2012 (PST)