• 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: Before I forget
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Before I forget


  • Subject: Re: Before I forget
  • From: Axel Luttgens <email@hidden>
  • Date: Sun, 16 Mar 2008 18:19:43 +0100

Le 15 mars 08 à 23:22, deivy petrescu a écrit :

I am reading the new Guide, and before I forget, I want to call the attention to some points.
[...]
The other point is the Guide assertion (p 52)
"The value of a variable declared with the copy or set command is reset each time a script is run."
This is not true!
Check:
___
try
set x to x + 1
on error
set x to 3
end try
---
run it many times without compilation in between.


Hello Deivy,

From page 51: "The declaration of a variable or property identifier is the first valid occurrence of the identifier in a script object."

In the above, assuming the script has been run at least once, the first valid occurrence of identifier "x" is the one appearing in the right-hand side of:
set x to x + 1
Thus, strictly speaking, one isn't considering a variable declared with the set command anymore, and one could infer the ASLG is right.
Or, at least, not wrong.


Looks like the new ASLG won't be the definitive "Bible"... ;-)
Axel

_______________________________________________
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
  • Follow-Ups:
    • Re: Before I forget
      • From: deivy petrescu <email@hidden>
References: 
 >Before I forget (From: deivy petrescu <email@hidden>)

  • Prev by Date: Re: 10.4.9 versus 10.4.10
  • Next by Date: Re: 10.4.9 versus 10.4.10
  • Previous by thread: Before I forget
  • Next by thread: Re: Before I forget
  • Index(es):
    • Date
    • Thread