borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Run-time error '7')Next Topic (coordinates in image) New Topic New Poll Post Reply
AndreaVB Forum : VB General : Multidimensional Arrays
Poster Message
Bad Boy
Level: Guest


icon Multidimensional Arrays  Archived to Disk

I have a question about multidimensional arrays.  I have a 2 dimensional array in my program.  As we all know, this is essentially an array of arrays.  Now here's my problem: I want to use the Erase statement on ONE of those arrays.  How do I do this, given that the syntax for Erase is
Erase [array name]()
with empty brackets.  How do I indicate which array I want to erase?

I would also like to know how to use a simple assignment operator to set a 1-D array equal to ONE of the arrays in my 2-D array.  This can be done if both arrays are 1-D, like the following:
array1() = array2()
But how do I say
array1() = [the 3rd array in 2-D array]
?

I know this is a bit hard to follow but it's a hard problem to discribe.
Thanks.

05-07-2002 at 08:09 PM
| Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1617
icon Re: Multidimensional Arrays  Archived to Disk

Don't think the first part's possible... you could always "erase" the array via a loop though, although would take a bit more time (depending on it's size).

Second part... Don't think it'd be possible (well not like you're wanting, and without something really complex like maybe moving memory locations arround). When doing a "b()=a()" setting the b()array to be the same as a(), if the dimensions of b are different, there's an error.


06-07-2002 at 02:35 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
AndreaVB Forum : VB General : Multidimensional Arrays
Previous Topic (Run-time error '7')Next Topic (coordinates in image) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder