ID:136945
Mar 28 2002, 11:18 am
|
|
Could an insert proc be added to lists? It would eliminate the need to manually bump all the contents of the list past the inserted object.
|
In response to Lummox JR
|
|
Lummox JR wrote:
English wrote: It's not as nice as having them built in, but I have a proc for swapping I've written, if anyone's interested. It's written for swapping objects in an inventory, but could easily be adjusted for any list. |
In response to Lummox JR
|
|
The one time I don't search the forum first it ends up being something that was requested before :p
Oh well, I guess it can't hurt to job their memories :) What I was just using it for actually isn't that complicated of a case but there have been times where it would have been usefull before. I just need to take what is on the end of the list and put it in the front which can be accomplished easily with something like this: var/temp = L[L.len] L = list(temp) + (L - temp) |
In response to Lummox JR
|
|
To be honest, I'd love it if all of the procs in my ListHelp library were made obsolete by hardcode.
|
I've been requesting Insert() and Swap() for some time now.
Lummox JR