Re: List appending question
Re: List appending question
- Subject: Re: List appending question
- From: Michelle Steiner <email@hidden>
- Date: Mon, 11 Aug 2003 17:43:35 -0700
On Monday, August 11, 2003, at 03:54 PM, Chris Backas wrote:
I've got two lists, and I'd like to put the contents of on list into
the other - however, not in the appending way.
ListA = {}
ListB = {"Some Stuff","Some Other Stuff"}
I would like to make ListA become {{"Some Stuff", "Some Other Stuff"}}
Rather than taking all ListB's value's and appending them to ListA.
Assuming that listA is always an empty list, this will always work:
set ListB to {"Some Stuff", "Some Other Stuff"}
set ListA to {ListB}
If listA is not always an empty list, how to do it depends on what
result you want; your example--with one of the lists being
empty--doesn't tell us that.
set ListA to {"listA stuff"}
set ListB to {"Some Stuff", "Some Other Stuff"}
set ListA to ListA & {ListB}
--> {"listA stuff", {"Some Stuff", "Some Other Stuff"}}
set ListA to {ListA} & ListB
--> {{"listA stuff"}, "Some Stuff", "Some Other Stuff"}
set ListA to {ListA} & {ListB}
{{"listA stuff"}, {"Some Stuff", "Some Other Stuff"}}
--Michelle
--
We're surrounded. That simplifies the problem.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.