Results 1 to 4 of 4

Thread: Filling Multi Dimensional Arrays (Resolved)

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949

    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.

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    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.

  3. #3
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    To illustrate:
    I don't live here any more.

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949
    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
  •  



Click Here to Expand Forum to Full Width