realbasic-nug
[Top] [All Lists]

Re: Multidimensional array access

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: Multidimensional array access
From: Norman Palardy <npalardy@great-white-software.com>
Date: Fri, 31 Oct 2008 12:47:12 -0600
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <91458214-8B18-45D8-91AB-B6987378DEB4@tolisgroup.com>
References: <91458214-8B18-45D8-91AB-B6987378DEB4@tolisgroup.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com

On 31-Oct-08, at 11:30 AM, Tim Jones wrote:

Hi Folks,

Trying to build a multidimensional array like we used to in CBM BASIC to store a parent entry with a multi-child subset. I Dim the array like this:

 Dim theArray(-1, -1) As String

When I need to add a new subset, I create new instances of the top dimension by ReDim'ing the array as:

 ReDim theArray(theCount, -1)

However, this appears to actually clobber the previous subset level contents.

Pointers? Am I totally abusing the multidimensional array? Or am I just totally off the page and should be using a dictionary or collection?

I have a class called "SparseArray" on my web site that you could use


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>