Split, combine ok but where's extract?
b.xavier at internet.lu
Sat Feb 12 01:29:43 EST 2005
I did say I already wrote a function to extract these
but is there no split combination that does this without
a slow loop?
Here's the two functions I used
put the paramcount into xp
put empty into y
put empty into linecount
repeat with x = 1 to xp
get the number of lines in it
put it & comma after linecount
delete last char of linecount
put max(linecount) into linecount
repeat with x = 1 to linecount
repeat with y = 1 to xp
put line x of param(y) into z
put z & comma after line x of c
delete last char of c
function ExtractItems tabl,column,adelimiter
if adelimiter is not empty then
set the itemdelimiter to adelimiter
put "" into a
repeat for each line L in tabl
put (item column of l) into line x of a
add 1 to x
Of which the MergeColumn could use lots of optimizing ;)
But they're slow functions compared to split or combine.
If you extract the keys from a double array the problem
remains in the case of a second key name like
where, for example, the b keys have to be extracted.
That's why I was wondering if there was a faster function...
> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of
> Mark Wieder
> Sent: Saturday, February 12, 2005 02:54
> To: 'How to use Revolution'
> Subject: Re: Split, combine ok but where's extract?
> Friday, February 11, 2005, 9:07:06 AM, you wrote:
> M> Just wondering if there is a simple way to extract the list of the
> M> second key of an array
> repeat for each line theItem in the keys of array
> put item 2 of array[theItem] after field "myField"
> end repeat
> -- same obviously for item 1
> -Mark Wieder
> mwieder at ahsoftware.net
> use-revolution mailing list
> use-revolution at lists.runrev.com
More information about the Use-livecode