Split, combine ok but where's extract?

Alex Tweedly alex at tweedly.net
Sun Feb 13 19:33:26 EST 2005


David Vaughan wrote:

>
> Oh, and I also reversed the data and keys in the second code block 
> (first two lines) compared with the extract. Mechanical error.

I didn't even notice that :-)

Well - that makes it even clearer ..... here's your second code 
fragment, with the reversal "un-reversed".

  put field "f1" into tKeys -- the a,b \r c,d data    (reversal restored)
  put field "f2" into tData -- the 1,2 \r 1,3 data
  split tData with return
(and already there is a problem - tData has a single entry tData[1] = 3 )
  put 1 into i
  repeat for each line x in tKeys
    put tData[i] into myArray[x]
    add 1 to i
  end repeat
-- and to prove it happened
  combine myArray with return and "#"
  put myArray into field "f2"

puts them back in an array.

-- 
Alex Tweedly       http://www.tweedly.net

-------------- next part --------------
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.7 - Release Date: 10/02/2005


More information about the use-livecode mailing list