• 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: copy & set statments
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: copy & set statments


  • Subject: Re: copy & set statments
  • From: "Marc K. Myers" <email@hidden>
  • Date: Mon, 22 Oct 2001 02:10:09 -0400
  • Organization: [very little]

> From: "Ted Wood" <email@hidden>
> To: <email@hidden>
> Cc: <email@hidden>
> Subject: RE: copy & set statments
> Date: Sun, 21 Oct 2001 21:27:17 -0700
>
> b) 'set' places an address to the value (if possible) into the
> variable. The exception to this is when you 'set' a variable to a
> literal value, as in the 'set x to 5' line below:
>
> Set x to 5 -- x gets 5
> Set y to x -- y gets the address of x
> -- if x changes, y sees
> the new value

Not true!

set a to 5
set b to 10
set x to a
set y to x
set x to b
y
-->5

x changed, but y did not see. Data sharing works specifically with
lists, records, and script objects. In the situation above, y gets the
same value as x, not x's address, because x represented a simple integer value.

Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074

[10/22/01 2:09:10 AM]


  • Prev by Date: RE: copy & set statments
  • Next by Date: FW: hash arrays and other mysteries
  • Previous by thread: Re: copy & set statments
  • Next by thread: Re: RE: copy & set statments
  • Index(es):
    • Date
    • Thread