realbasic-nug
[Top] [All Lists]

Multidimensional array access

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Multidimensional array access
From: Tim Jones <tjmac@tolisgroup.com>
Date: Fri, 31 Oct 2008 10:30:56 -0700
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
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
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?

Tim



_______________________________________________
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>