On Jul 27, 2007, at 9:54 PM, RJay Hansen wrote:
> Thanks to everyone!
>
> I must admit I was kind of embarrassed to ask since this seemed
> like it should be pretty basic.I knew I could count on this list to
> get an answer. And I got a wide selection of methods to choose from!
>
> RJay
Just don't let it happen again. ;-)
I don't think anyone mentioned this permutation yet, but another way
to add lists together and get a list of lists is to make each list a
nested list from the get-go. Observe:
set nestedlist1 to {{"a", "b", "c"}}
set nestedlist2 to {{"one", "two", "three"}}
set nestedlist3 to {{"do", "re", "mi"}}
set nestedlist4 to nestedlist1 & nestedlist2 & nestedlist3
> {{"a", "b", "c"}, {"one", "two", "three"}, {"do", "re", "mi"}}
It's also worth mentioning how to refer to items in nested lists.
"one" is in list 2 of nestedlist4
> true
first item of the last list of nestedlist4
> "do"
There's something about those double quotes and double braces that
always makes me think I need stronger reading glasses, especially
with anti-aliasing.
|