Hello William,

This will give you an array with four keys corresponding to [1] fruit, [2] 
dances, [3] colours, and [4] animals.

repeat for each line thisLine in theList
put the first item of thisLine & comma after myArray[the second item of 
thisLine]
end repeat

The contents of each has a trailing comma, which can be removed by following 
with

repeat for each key thisKey in myArray
if the last character of myArray[thisKey] is comma \
then delete the last character of myArray[thisKey]
end repeat


Regards,

Gregory


On Mon, Nov 1, 2010, at 8:15 AM, use-revolution-requ...@lists.runrev.com wrote:

> I was wondering. If you have a list:
> 
> apple,1
> orange,1
> grapefruit,1
> tango,2
> blue,3
> green,3
> yellow,3
> zebra,9
> 
> And you want to convert it into an array:
> 
> (apple,orange,grapefruit[1])
> (tango[2])
> (blue,green,yellow[3])
> (zebra,[9])
> 
> What would be the easiest way. I'm always a little confused by arrays but it
> seems to me this should be a very simple and fast conversion. The array is
> intentionally a string "apple,orange,grapefruit" that results from key [1]

_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to