Re: (no subject)
Re: (no subject)
- Subject: Re: (no subject)
- From: Paul Berkowitz <email@hidden>
- Date: Wed, 01 Jan 2003 12:03:03 -0800
On 1/1/03 11:48 AM, "Jerry Podhajsky" <email@hidden> wrote:
>
I'm sure this is really simple, but I can't seem to find any good
>
reference on it. I want to make a list of lists:
>
>
set d1 to {date "9/8/20", 1}
>
set d2 to {date "1/1/02", 2}
>
set d3 to {date "12/1/02", 3}
>
>
set masterlist to {}
>
>
set masterList to d1 & d2 & d3 -- yields a string concatenation of all
>
the list items.
>
>
The result I want is:
>
>
{{date "9/8/20", 1},{date "1/1/02", 2},{date "12/1/02", 3}}
>
>
All help appreciated.
set masterlist to {}
set end of masterlist to d1
etc.
That's actually a better, faster and more efficient way of appending to
lists in any case since it doesn't have to make a new list in memory each
time. I'd recommend doing that for each item in a repeat loop. However, if
you insist on concatenating, you could instead do
set masterList to {d1} & {d2} & {d3}
--
Paul Berkowitz
_______________________________________________
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.
References: | |
| >(no subject) (From: "Jerry Podhajsky" <email@hidden>) |