jbreard Posted May 27, 2021 Posted May 27, 2021 Good morning (evening) everyone, I have a question which will seam basic to you I guess concerning a simple list manipulation. I have a list of the form ((X0 Y0 Z0 T0) (X1 Y1 Z1 T1)...(Xn Yn Zn Tn)) and I want to extract efficiently a sublist form this list ((Xi Yi Zi Ti)....(Xj Yj Zj Tj)) given that I know the ranges i and j. I know how to do that using a "while" loop and populating a sublist by accessing the elements trough "nth" but that is not very efficient. An other approch could alos be to use a formula using 2 time "member" and "reverse" and "nth" but that is not efficient as well. I have to perform this extraction on a list whose length is about 40 000 and I must perform this extraction about 2000 times. Hence the need for speed... I'm sure that a language like AutoLISP must have efficient ways to do that but I don't see it at the moment. Does anyone as an insight on that matter ? Maybe a basic function that I don't know about ? Thank you very much for your help, Jacques Quote
jbreard Posted May 27, 2021 Author Posted May 27, 2021 Thanks a lot, That is just perfect. I know of course of Lee-Mac's treasure's website but I missed this one Have a nice day, Jacques Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.