Moving an object up or down a type list

BlitzMax Forums/BlitzMax Beginners Area/Moving an object up or down a type list

Robert Cummings(Posted 2005) [#1]
Hi,

I have a very simple list like so:

Type myList
field item
End Type

then I create a simple linked list with say, 10 of these items.

I want to move one of them to the end of the list - how do I do this quickly without deleting and remaking it?


Dreamora(Posted 2005) [#2]
Do you mean using TList?

just .remove (item) .addlast (item)

This does not delete item, just remove and reenter it the list.


Robert Cummings(Posted 2005) [#3]
ah thank you so much :)

unfortunately I get an error : Compile Error: Identifier 'remove' not found


Robert Cummings(Posted 2005) [#4]
edit: did it with

ListRemove & ListAddLast

Thanks for the ideas.


Dreamora(Posted 2005) [#5]
.remove and .addlast are for OO usage (ie if you have a list:TLIST object to use with list.remove and list.addlast)

happy that i was able to help :)