Re: Associative with MultiDimensional arrays




Aziz wrote:
I try to implement a 3 dimensional array with the first index as a string. Is
it not possible?

Definitely not, because there are not "arrays with string index", they
do not exist in the nature. There objects of type Object with
properties and objects of type Array with integer indicies.

You can create an object and store array references as its properties:

var obj = {};

obj.p1 = [1,2,3];
obj.p2 = [1,2,3];

further more each array element can hold a reference either to a map or
an array:

obj.p1[0] = [1,2,3];
obj.p2[1] = {'foo':'bar'};

and further and further up to structures of any complexity.

.



Relevant Pages

  • Re: After import the wsdl i have lost it a bit
    ... ControleerInput requestMessage = new ControleerInput; ... You need to create an array of AanvraagCovType objects, and assign that to the Verzekerden property of the ControleerInput object. ... UitDeCOVClass.controleerin TheReturn slometing like TheReturn ... The example code puts the result in a variable of the type object, while you are putting it in a variable of the type RetourinfoCovType. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: I cant extract string data from a type object
    ... > I am calling a COM object that returns a type Object and ... > it contains two strings but I can't get them out. ... > object ParamNameObj= localxPCCOMOBJ.xPCTarget.GetParamName ... Could you show *how* you've tried to use it as an array? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How to know the size of array
    ... sizeof foo will return the total number of bytes taken up by the whole ... single array element, so yes, the expression ... what actually gets passed to bar is a pointer type object, ...
    (comp.lang.c)
  • Re: Associative with MultiDimensional arrays
    ... do not exist in the nature. ... There objects of type Object with ... You can create an object and store array references as its properties: ...
    (comp.lang.javascript)
  • Re: java method returning an array of 2 integers
    ... Possible solutions include splitting the method into two, ... > return an array with length 1? ... In stead of saying "it's better in general to avoid this," I would ... the nature of the thing (0th represents width, 1st represents height, ...
    (comp.lang.java.help)