Re: Variable Tendencies
Re: Variable Tendencies
- Subject: Re: Variable Tendencies
- From: Christopher Nebel <email@hidden>
- Date: Mon, 3 Apr 2006 10:09:38 -0700
On Apr 2, 2006, at 5:54 PM, deivy petrescu wrote:
On Apr 2, 2006, at 18:23, Mark J. Reed wrote:
First, it's not a stupid question. What you're talking about is
called "persistence". AppleScript variables are not persistent.
I agree with the first assertion, it is not a stupid question, but
I disagree with the fact that AppleScript variables are not
persistent, they are...
Try this at home:
Open SE(*) type the following script
<script>
try
set x to x + 1
on error
set x to 1
end try
</script>
keep pressing the run button:
--> 1,2,3,4,...
So yes, variables are persistent.
Some variables are persistent -- it depends on their scope. Global
variables are; local ones aren't. (The fact that global variables
persist was, I'm pretty sure, not intended by the original designers,
but it's not going to change.)
--Chris Nebel
AppleScript and Automator Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden