|
-
May 5th, 2004, 05:25 PM
#1
Thread Starter
PowerPoster
Filling Multi Dimensional Arrays (Resolved)
Hi,
How do you fill all the elements of a multidimensional array?
e.g.
Dim strArray(6,3,2) as Array
how do I put values into each dimension, Please? Putting values into the final dimension is easy e.g.
strArray(1,2,2)="This goes in"
is stored in the second element of the third dimension, first rank.
Nothing in MSDN or my books gives any help on this.
Last edited by taxes; May 6th, 2004 at 05:04 AM.
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
May 6th, 2004, 02:09 AM
#2
You have to specify 3 subscripts no matter where you want to put the data. As such you can't put data into a dimension, that makes no sense. A dimension is not a storage medium,it's a parameter of the array.
You have 3 dimensions in your array which can be literally thought of as the length, width and height dimensions. The subscripts in the brackets are literally the co-ordinates of the position in memory that you want to store the new value in.
I don't live here any more.
-
May 6th, 2004, 02:23 AM
#3
To illustrate:
I don't live here any more.
-
May 6th, 2004, 05:03 AM
#4
Thread Starter
PowerPoster
Hi,
Many thanks. No wonder my brain was getting addled
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|