Arrays: new and old keys, i

Mark Brownell gizmotron at earthlink.net
Sat Sep 13 12:22:15 EDT 2008


>
>Multi-dimensional arrays are a powerful addition to Revolution as it  
>provides a basis for more powerful array manipulation features in the  
>engine moving forward. I feel that ordered keys form the basis for a  
>lot of those features.
>
>Trevor DeVore

Good idea.

It's been a while but I believe that that ordering is how the Lists worked in Director. You didn't assign them key names. They could have parameters too, divided by ":"  You just put data into an ordered spot. To be honest I like the non order sometimes, the way it is in Rev.

What about using "after" if you want order instead of "into." "After" could cause order for those that need it. It would be great for me because I could do this:

"put thisData after myArray[1][1]"

"put myArray[1][1][4] into holdParameterImageList"

I would not need to identify positions with keys if I were just populating the Array like a List.

As it is now I must force it together with "into."

"put thisData into myArray[1][1][4]"

I think both ways is the best options. Sometimes you want meaningful keys. Now that I think about it you are getting meaningful keys and numerical positions at the same time with "into."

That was a lot of help. I just think that "after" might make it clear that it should go in order.




More information about the use-livecode mailing list