More Dimensional Array

Discussion in 'Questions (Windows Mobile)' started by Xardas, Jun 26, 2007.

  1. Xardas

    Xardas New Member

    Hello out there.

    Well I've got a littel problem with arrays.
    I wantet a array including another array that includes one last array, I wantet to make a little Map with x and y coords. So like :

    worldpart ( x (y ( name, typ)))

    Is there any way to get a such an array?
    Thx for Help^^
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You can use a multi-dimension array or structure:
    Dim Map(100,100)
    Map(x,y) = 2

    Or:
    Dim Type(Color,Value) Map(100,100)
    Map(x,y).Color = cBlue
     
  3. Xardas

    Xardas New Member

    That's exaclty what I want ^^ Thx
     
    Last edited: Jul 1, 2007
  4. Xardas

    Xardas New Member

    But now i have another question, is it possible to make a array like
    Dim type(color,value) map(x,y,id) so like
    Dim type(color,value) map(200,200,300) ?
    Or is there a way to get the x and y coords if i have the id and an array like this

    dim type(color,value,id) map(x,y) ?
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    When working with structures you are limited to two dimensions (two dimensions structures will be converted at runtime to three dimension arrays).
     
Loading...