Re: Non-executed repeat loop robs variable of value/definition
Re: Non-executed repeat loop robs variable of value/definition
- Subject: Re: Non-executed repeat loop robs variable of value/definition
- From: Matt Neuburg <email@hidden>
- Date: Mon, 29 Aug 2005 12:42:29 -0700
On Mon, 29 Aug 2005 01:51:05 +0100, kai <email@hidden> said:
>
>set n to 1
>local n
>
>--> "Syntax Error: Can't declare n as both a local and global variable."
>
>----------
>
>In a sense, a repeat loop (which evidently *can* allow both) seems to
>contradict this:
Exactly. That's what's so interesting about your example.
>The gotcha for me was the "undefining" effect on the initial (global)
>variable
Okay, but let me just remind you - it never got undefined. It's just that
you lost your access to it. And you can regain that access by saying "my".
m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
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