list llList2ListStrided(list src, integer start, integer end, integer stride)
Copies the strided
slice of the list
returns a list consisting of every stride'th element from src
that is between element start
and element end
list src = ["a", 1, 2, "b", 3, 4, "c", 5, 6, "d", 7, 8];
llList2ListStrided(src, 1, 7, 3);
The result is: [ "b", "c" ]
Probably the most useful application would be:
Which gives the result: [ "a", "b", "c", "d" ]
Q & A:
Q: What's a "stride"?
A: See stride.
Q: How do you get a list of the anything but the first items in the stride? I've tried various combinations of parameters and never got quite what I expected. If I want the whole sub-list I'd expect passing 0 as start would give me a list of the first elements, 1 would give the second elements and so forth, but that's not what happens like an offset into the stride.
A: That is not possible with this function - it can only access the first element in a stride. Perhaps it isn't working as it was originally intended, as the more reasonable way for it to work would indeed be to select elements from the stride based on start.
However, there is actually a workaround for this. To produce a list of all the second elements, just chop the first element off the list with llList2List or llDeleteSubList. This effectively causes llList2ListStrided to offset where it counts the start of the stride from.
So, to get every second element...
and to get every third element...
Compare with llList2Float
This article wasn't helpful for you? Maybe the related article at the LSL Portal
is able to bring enlightenment.
| Lists Jasa SEO Jasa SEO Murah Sepatu Online Toko Sepatu Online Sepatu Sepatu Murah Sepatu Safety Sepatu Futsal Cheapes Hostgator Coupon Link Booking Televisori offerte Notebook Offerte Berita Terkini Internet Marketer Muda Internet Marketer Indonesia Portatile Apple RDAnet Lorks Karikatur Bisnis Modal Kecil Bisnis UKM Berita Terbaru Iklan Baris Jasa SEO Jasa SEO Murah SEO Indonesia Konsultan SEO SEO Belajar SEO Kursus SEO Kursus SEO Murah Jam Tangan Casio Jam Tangan Casio Jam Tangan Murah Jam Tangan Grosir Baju Terbaru Grosir Baju Baju Terbaru Grosir Baju Murah Bisnis Online Belajar SEO Kerupuk Kerupuk kulit Social Bookmark Dofollow Social Bookmark Kumpulan Puisi Kirim Puisi bola hantu Penumbuh Rambut Penumbuh Rambut timbangan WBC Wonogiri Jasa SEO Murah Jasa SEO Jam Tangan Murah