Split followed by Transpose

Dar Scott dsc at swcp.com
Mon Mar 22 23:14:19 EST 2004


On Monday, March 22, 2004, at 08:38 PM, Glen Bojsza wrote:

> I thought that the split command actually would put the data into the 
> format that transpose recognizes ...what you have indicated?

Sorry about the cryptic response.

Transpose expects a "2D" array, not an array of rows.

The key of the "2D" array is a pair of numbers, like this:  "4,5"

I read this...
> I have a field "test"
> 1	23	33
> 2	12	67
>
...as your really wanting this:
put 23 into a[1,1]
put 33 into a[1,2]
put 12 into a[2,1]
put 67 into a[2,2]

That puts the values into a "2D" array.

What you would get if you split the above field, is the same as this:

put 23 & tab & 33 into a[1]
put 12 & tab & 67 into a[2]

Dar Scott




More information about the use-livecode mailing list