Arrays: new and old keys, i

Björnke von Gierke bvg at mac.com
Fri Sep 12 04:53:23 EDT 2008


On 12 Sep 2008, at 07:50, John Vokey wrote:

> Can anybody explain what the new array format provides that the old  
> did not?



http://www.runrev.com/newsletter/july/issue53/newsletter1.php

If you read the above revup article, then all the new features are  
described there. If that's too cumbersome, here a short list:

multi dimensional:
Arrays used to be of the form "theArray[theKey]" workarounds had to be  
employed to store hierarchical data in an array: "put "rex" into  
theArray["animals, dogs, jorkshire, name"]". Many additional steps had  
to be done to access such data, and certain things would have been way  
too complex. With the new arrays there can be "true" hierarchical data  
stored, especialy for nonsequential access, this simplifies a lot of  
things: "put "rex" into theArray["animals"]["dogs"]["jorskshire"] 
["name"].

first level data structure:
Arrays could not be passed as values to functions or handlers, nor  
returned as result from them. This again simplifies things like the  
recursive directory walker I made as an example yesterday in this  
thread.

have fun
Bjoernke

-- 

official ChatRev page:
http://bjoernke.com/runrev/chatrev.php

Chat with other RunRev developers:
go stack URL "http://bjoernke.com/stacks/chatrev/chatrev1.3b3.rev"




More information about the use-livecode mailing list