Re: set vs copy?
Re: set vs copy?
- Subject: Re: set vs copy?
- From: Thomas Fischer <email@hidden>
- Date: Wed, 15 Sep 2010 10:38:07 +0200
Hi Shane,
> On 15/9/10 5:40 PM, "Thomas Fischer" <email@hidden> wrote:
>
>> There seems to be a difference between modifying A and giving A a new value
>
> Exactly -- they are quite different things. That's why the difference is
> only relevant to things like lists, records and dates -- they *can* be
> modified, whereas text and reals cannot.
Yes, my only question is how do you know which is which?
That
set A to A & 4
and
set end of A to 4
are different things seems to me to be an implementation issue, which I can only find by testing.
There is a vague hint on ASLG p.94:
copy n to the end of bigList
-- DON'T DO THE FOLLOWING
--it's even slower!
-- set bigList to bigList & n
I suppose that concatenation using "&" *always* creates a new variable, but didn't find that.
The end and beginning operators are different from concatenation and have their own idiosyncrasies, e.g. compare for A = {1,2,3}:
set beginning of A to A
set end of A to A
set A to A & A
Thomas
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden