Split command key order

Ben Fisher boinjyboing at hotmail.com
Thu Mar 3 22:55:46 EST 2005


> I know that the "combine" command will yield a list that is not in
> any particular order. However, I always thought the "split" command
> would split out the keys in the order of the original list.

I too was disappointed by the split and commands. One project involves turning arrays into lists back into arrays. This is pretty slow manually, and I thought that split and combine could do the trick. However, the weird order messed things up.

There should be a "listToMatrix" function that does something like this:
mydata=
1,1,1,2,3
1,1,2,3,4

put ListToMatrix(myData,comma,return) into matrx
The result would be a 2x5 matrix where matrx[1,1] would be 1, matrx[2,4] would be 3, and so on.

There would also be a MatrixToList which be the reverse. One could also transform 3d matrices by something like put ListToMatrix(myData,comma,tab, return). Of course you can do all of this manually through scripts but it is pretty slow, at least for the size of matrices I'm working with.

Looking through the docs, there isn't much on arrays or matrices. It would be nice to have one doc page that is an overview of their capabilities. My docs don't work, but I guess that's another story.

-Ben



More information about the use-livecode mailing list