arrays

BlitzMax Forums/BlitzMax Programming/arrays

ziggy(Posted 2006) [#1]
Wich is the fastest way to add / remove items from a one dimension array? (even if adding or removing them from the middle of the array)


Grey Alien(Posted 2006) [#2]
do you mean inserting into an array so that the array expands and removing so that the array shrinks? Or do you just mean overwriting the value with a valid one or with 0?


rdodson41(Posted 2006) [#3]
If you adding/removing/inserting it might be a better idea to use a linked list (check out TList and TLink) because they are made to be able to do that better than a normal array. But if you really need to you can try using slices (see the docs). Hope it helps.