Split followed by Transpose
Glen Bojsza
gbojsza at mac.com
Tue Mar 23 09:33:22 EST 2004
This really clears up everything....but then the question I have to ask
is why would you have one command (split) create a 1D array and have
another command that only works with a 2D array (transpose)?
Would there not be a greater benefit if the split command or another
"new" split command support the creation of a 2D array? Arrays are very
powerful but if you need to write repeat loops to work with them in one
direction you seem to lose a lot of the power.
I would love to hear what others think about this...maybe I'm missing
the point?
On Monday, March 22, 2004, at 10:14 PM, Dar Scott wrote:
>
> 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
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list