• 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: by-value vs by reference (was Re: list question)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: by-value vs by reference (was Re: list question)


  • Subject: Re: by-value vs by reference (was Re: list question)
  • From: John Baltutis <email@hidden>
  • Date: Thu, 5 Jun 2003 23:45:26 -0700

On 6/5/03, Andrew <email@hidden> wrote, among other things:
>
> set y to 5 -- creates a new number with the value of 5
> set x to y -- sets X to the same number as y
> set the value of y to 6 -- set the number to 6

Sorry, this returns an AppleScript error: Can't set value of 5 to 6.


set y to 5 -- creates a new number with the value of 5
set x to y -- sets x to the the value of 5
set y to y + 1 -- sets y to the the value of 6 AND doesn't do a thing to x
return {x, y}
->{5, 6}
_______________________________________________
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: How to block all but allowed-list web sites?
  • Next by Date: Re: by-value vs by reference (was Re: list question)
  • Previous by thread: Re: Locations of Desktop icons
  • Next by thread: Re: by-value vs by reference (was Re: list question)
  • Index(es):
    • Date
    • Thread