Re: list question
Re: list question
- Subject: Re: list question
- From: Deivy Petrescu <email@hidden>
- Date: Wed, 4 Jun 2003 18:13:57 -0400
Good topic.
i just learned that mutability is not changeability.
set c to characters of "lista"
set d to c
{d, c} --> {{"l", "i", "s", "t", "a"}, {"l", "i", "s", "t", "a"}}
set item 1 of c to "cl"
{d, c} -->{{"cl", "i", "s", "t", "a"}, {"cl", "i", "s", "t", "a"}}
set item 2 of c to "u"
{d, c} -->{{"cl", "u", "s", "t", "a"}, {"cl", "u", "s", "t", "a"}}
set last item of c to "er"
{d, c} --> {{"cl", "u", "s", "t", "er"}, {"cl", "u", "s", "t", "er"}}
set c to characters of "lista"
{d, c}-->{{"l", "i", "s", "t", "a"}, {"cl", "u", "s", "t", "er"}}
same thing if the last line is changed to
set c to c & "s"
{c, d} --> {{"cl", "u", "s", "t", "er", "s"}, {"cl", "u", "s", "t",
"er"}}
interestingly if you change one of the above lines to
set item 3 of c to c
then the script enters in an infinity loop.
Regards
Deivy Petrescu
http://www.dicas.com/
_______________________________________________
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.