Re: Reading nested lists from a preference file
Re: Reading nested lists from a preference file
- Subject: Re: Reading nested lists from a preference file
- From: Greg Strange <email@hidden>
- Date: Tue, 24 Apr 2001 00:23:29 -0500
on 4/24/01 12:00 AM, Yosuke Ichikawa at email@hidden wrote:
>
I'm working with a nested list. To give a simplified
>
example, I want the script to work like so;
<snip>
This is a classic problem in scripting. I have this challenge all the time.
In some of the more "ubiquitous" scripting languages, one uses not the list
itself but a reference to a list. So you have a list of the list names.
Like so,
set firstList to {1, 2, 3}
--(*1,2,3*)
set secondList to {4, 5, 6}
--(*4,5,6*)
set thirdList to {firstList, secondList, 7, 8, 9}
--(*1, 2, 3, 4, 5, 6, 7, 8, 9*)
set extractedItem to item 1 of item 2 of thirdList
--(*4*)
Hope that helps.
Greg Strange