On Jan 10, 2007, at 7:10 AM, Tom Benson wrote:
I just need a single dimensional array that stays in sequential
index order whenever I remove an element.
I know I could rebuild an array once I remove an entry, but the
arrays I'm dealing with could get rather large (10,000 + elements).
If there is a better framework solution for this, then someone tell
me, because I can't find one.....
- Tom
You'd have to write a wrapper class, and handle the 'Remove's
yourself. Or just remove the last element of the array. i.e. if - in
your example - you remove element three, then rearrange the contents
so that elements 3 and 4 contain 'three' and 'four' again, then you
get the same thing as if you had just removed the element at the end
(namely, 5, in your case) which seems like a lot simpler solution
(IIRC, the Pop method of an array will do this for you.)
On 10/01/2007, at 11:45 PM, Terry Ford wrote:
On Jan 10, 2007, at 12:38 AM, Tom Benson wrote:
I have a need for indexed arrays.. e.g.
array(0) = zero
array(1) = one
array(2) = two
array(3) = three
array(4) = four
array(5) = five
array.remove(3)
array(0) = zero
array(1) = one
array(2) = two
array(3) = four
array(4) = five
So that when I remove an element, the array index collapses back
into sequence...
Do you mean using Remove in a multi-dimensional array or an array
of arrays as that already works in a one-dimensional array?
Terry
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>