Combine/split arrays

Brian Yennie briany at qldlearning.com
Fri Aug 29 18:55:01 EDT 2003


My limited test in the message box here seems to indicate that 
combine/split work OK with multidimensional arrays, but it was an 
admittedly small test.

Try running this on your newly split array when you are reading it back 
in:

repeat for each line theKey in keys(myData)
   put theKey&&myData[theKey]&cr after temp
end repeat
answer temp

This should at least reveal what *is* in the array.

Any chance that either of your delimiters still appear in the combined 
text? If it's line-by-line is there any reason to not use tab/return 
(which will be more readable)?

BTW, in my email I wrote:
split myArray using tab and return

But I should have written:
split myArray using return and tab

Here's the script I quickly threw in the message box, FWIW:

put "test" into myArray[1,1]
put "test2" into myArray[50,61]
put "test3" into myArray[50,62]
put "test4" into myArray[51,62]
combine myArray using return and tab
answer myArray
split myArray using return and tab
repeat for each line theKey in keys(myArray)
   put theKey&&myArray[theKey]&cr after temp
end repeat
answer temp


HTH

Brian


> eg:  myData[1,50]
> eg:  myData[300,860]




More information about the metacard mailing list