• 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: Non-executed repeat loop robs variable of value/definition
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Non-executed repeat loop robs variable of value/definition
      • From: kai <email@hidden>
  • Prev by Date: Re: Clipboard and Entourage
  • Next by Date: Re: A Yummy (_Not_) Bug: Gremlin is Rewriting my GUI-Scripting
  • Previous by thread: Re: Non-executed repeat loop robs variable of value/definition
  • Next by thread: Re: Non-executed repeat loop robs variable of value/definition
  • Index(es):
    • Date
    • Thread