• 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: John Baltutis <email@hidden>
  • Date: Wed, 4 Jun 2003 22:17:32 -0700

On 6/4/03, Doug McNutt <email@hidden> wrote:
>
> Can you explain just how "b" here refers to the same object as "a". Why
>doesn't the second calculation return 6? (I'd really be upset if it did!)

Hopefully, correct me if I'm wrong, the following answers your question:

> set a to 2
=2, the object 2 is given the name a, a points to the object 2
> set b to a
=2, the object 2 is given the name b, , b points to the object 2
> set c to a + b
2+2=4, the object 4 is given the name c , c points to the object 4
> c
> --> 4
> set a to a + 1
2+1=3 , the object 3 is given the name a , a NOW points to the object 3 and
no longer the object 2, b STILL points to the object 2
> set c to a + b
3+2=5, the object 5 is given the name c , c NOW points to the object 5 and
no longer to the object 4
> c
> --> 5
>
> Can you explain just how "b" here refers to the same object as "a". Why
>doesn't the second calculation return 6? (I'd really be upset if it did!)
_______________________________________________
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.

  • Prev by Date: Re: FaceSpan
  • Next by Date: Re: Duplicating Items In Illustrator 10 (OS X)
  • Previous by thread: Re: list question
  • Next by thread: Activate scripts at startup.
  • Index(es):
    • Date
    • Thread