Re: copy & set statments
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]