Difference between revisions of "Talk:LlList2ListStrided"
Jump to navigation
Jump to search
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),…") |
|||
Line 26: | Line 26: | ||
Kira Komarov 07:11, 8 January 2012 (PST) | 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. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 11:30, 8 January 2012 (PST) |
Revision as of 11:30, 8 January 2012
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)