Re: list question
Re: list question
- Subject: Re: list question
- From: Chris Page <email@hidden>
- Date: Tue, 03 Jun 2003 19:03:28 -0700
On Tuesday, Jun 3, 2003, at 17:52 US/Pacific, Michelle Steiner wrote:
On Tuesday, June 3, 2003, at 01:37 PM, Chris Page wrote:
Lists and records are mutable. Numbers, strings, and most (all?)
other AppleScript objects are not -- you must copy string contents to
a new object if you wish to work with a substring, for example.
I do not follow this at all; a number or string is mutable.
set a to "A"
set a to a & "B"
a
--> "AB"
So string a is mutable; it was changed.
What you did was bind the variable 'a' to a new string created by
concatenating "A" -- the string 'a' was initially bound to -- and "B".
set a to "A"
set original_a to a
set a to a & "B"
{a, original_a}
--> {"AB", "A"}
What you're seeing is 'a' being bound to a new value. Nothing is being
mutated.
--
Chris Page - Software Wrangler - Palm, Inc.
*** MAKE ME MONEY NOW!! SEND ME ALL YOUR MONEY ***
*** THEN SEND THIS TO EVERYONE YOU KNOW!! ***
_______________________________________________
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.