• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: list question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: list question
      • From: Chris Page <email@hidden>
References: 
 >Re: list question (From: Andrew Oliver <email@hidden>)

  • Prev by Date: RE: Quark - search and replace
  • Next by Date: Re: list question
  • Previous by thread: Re: list question
  • Next by thread: Re: list question
  • Index(es):
    • Date
    • Thread