• 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
Test for existence of a variable?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Test for existence of a variable?


  • Subject: Test for existence of a variable?
  • From: "Mark J. Reed" <email@hidden>
  • Date: Thu, 11 Aug 2005 10:15:45 -0400

DIdn't see anything on this topic in my copy of Neuberg.  Is there any way to test to see if a variable has been defined?  This code snippet works great if the global variable _ has been assigned a value.  If not, however, it fails when I try to save a copy.  Is there any sort of test I can use which will test for the variable being defined without blowing up?  Or any sort of exception-catching mechanism to intercept the blowup before it happens?

global _
set saved_ to _
(* do stuff with _ *)
set _ to saved_



--
Mark J. Reed <email@hidden>
 _______________________________________________
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: Test for existence of a variable?
      • From: Michelle Steiner <email@hidden>
    • Re: Test for existence of a variable?
      • From: Adam Wuellner <email@hidden>
    • Re: Test for existence of a variable?
      • From: "Gary (Lists)" <email@hidden>
  • Prev by Date: MS Entourage to Text file
  • Next by Date: Re: MS Entourage to Text file
  • Previous by thread: Re: MS Entourage to Text file
  • Next by thread: Re: Test for existence of a variable?
  • Index(es):
    • Date
    • Thread