how to split a list in two directions?

hh hh at hyperhh.de
Sat Oct 28 19:27:47 EDT 2017


> Alex T. wrote:
> Not a one-liner, but I'd be wiling to guess that
> 
> repeat for each line L in theData
>    put item 2 of L into A1[item 1 of L]
>    put item 1 of L into A2[item 2 of L]
> end repeat will
> 
> be as quick as any other method.

This is certainly a very fast and elegant method. The problem is,
that one of the items, here item 2 (a name), may not be unique.
So, in case "Müller" is among the names, this slight change may help:

repeat for each line L in theData
   put space & item 2 of L after A1[item 1 of L]
   put space & item 1 of L after A2[item 2 of L]
end repeat will





More information about the use-livecode mailing list