Re: Deleting last item of a List
Re: Deleting last item of a List
- Subject: Re: Deleting last item of a List
- From: "Shane Stanley" <email@hidden>
- Date: Sat, 20 Nov 2004 10:56:54 +1100
On Fri, 19 Nov 2004 16:21:55 -0500, Hanaan Rosenthal wrote:
>The two ways to create a list are:
>1. set theList to theList & newItem
>2. set end of theList to newItem
>
>Unless the item you are adding is a list by itself, the two options
>will create a seemingly identical list.
>The lists differ, however, in the way they are handled in memory, and
>this is where speed comes in.
I think you're confusing two issues. The lists _are_ identical; the
efficiency comes because the first version builds a complete new list,
whereas the latter just modifies the existing list to point to an extra item.
--
Shane Stanley <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden