dealing w/ multidimensional arrays

Ken Ray kray at sonsothunder.com
Sun Oct 13 21:09:00 CDT 2002


You can access them by getting the "keys" of the array. For example:

  get the keys of myArr

Would return a multiline result:

  type 1,color red
  type 1,color blue
  type 2,color red
  type 2,color blue

Does this help you at all?

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/

----- Original Message ----- 
From: "Alex Rice" <alex at mindlube.com>
To: <use-revolution at lists.runrev.com>
Sent: Sunday, October 13, 2002 8:36 PM
Subject: dealing w/ multidimensional arrays


> It seems that Rev only simulates support for multidimensional arrays by 
> concatenating the key together for you. It makes creating 
> multidimensional arrays easy.  That's great but how do you get the data 
> out, unless you know the entire concatenated array key before hand? And 
> how likely is that? Do I have to use regular expressions to match my 
> "multidimensional" array keys to access my data?
> 
> Illustrating my problem
> 
> put "x" into myArr["type 1", "color red"]
> put "y" into myArr["type 1", "color blue"]
> put "z" into myArr["type 2", "color red"]
> put "a" into myArr["type 2", "color blue"]
> 
> -- oops can't do this:
> put myArr["type 1"] into myArrayOfTypeOneObjects
> 
> Am I missing something here, or is the multidimensional array support 
> only really during the creation of array keys, and not for accessing 
> them?
> 
> Alex Rice, Software Developer
> Architectural Research Consultants, Inc.
> alrice at swcp.com
> alex_rice at arc.to
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 



More information about the use-livecode mailing list