Re: Before I forget
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