Arrays: new and old keys, i

Trevor DeVore lists at mangomultimedia.com
Sat Sep 13 14:06:50 EDT 2008


On Sep 13, 2008, at 12:22 PM, Mark Brownell wrote:

> 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.

Hi Mark,

Indeed I think we could have both ways in Revolution and it wouldn't  
affect how arrays currently work. I think it would make arrays even  
more flexible.

In regards to using "after" - the one problem I see with this approach  
would be that after is already used for appending values to a  
variable. I'm not sure how the parser could determine whether you  
wanted to add another element to the array or append thisData to the  
current value of myArray[1][1]. Perhaps some sort of variant to the  
syntax might work though.

Regards,

-- 
Trevor DeVore
Blue Mango Learning Systems
www.bluemangolearning.com    -    www.screensteps.com



More information about the use-livecode mailing list