• 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: global variables
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: global variables


  • Subject: Re: global variables
  • From: Luther Fuller <email@hidden>
  • Date: Thu, 18 Jul 2013 07:27:45 -0500

On Jul 17, 2013, at 6:44 PM, Deivy Petrescu wrote:

Every top level variable is persistent in AS.
All of them.
One does not need to declare it global to make it persistent.

Yes, top level variables (i.e. those used in the run handler) are by default global variables.
This might be a big problem !!!!!!

You can make them local like this ...

on run
local x, y, z


set x to y + z
-- and other stuff
end run



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >global variables (From: Jim Brandt <email@hidden>)
 >Re: global variables (From: Luther Fuller <email@hidden>)
 >Re: global variables (From: Kaydell Leavitt <email@hidden>)
 >Re: global variables (From: Luther Fuller <email@hidden>)
 >Re: global variables (From: Deivy Petrescu <email@hidden>)

  • Prev by Date: Re: global variables
  • Next by Date: Re: Gathering DiagnosticReports from Console...
  • Previous by thread: Re: global variables
  • Next by thread: Re: global variables
  • Index(es):
    • Date
    • Thread