Before I forget
Before I forget
- Subject: Before I forget
- From: deivy petrescu <email@hidden>
- Date: Sat, 15 Mar 2008 18:22:26 -0400
I am reading the new Guide, and before I forget, I want to call the
attention to some points.
The Guide mentions constant, I remember being brought up that
constants are not very constants in AS.
For instance
set pi to 3
makes pi=3!!!
But I was not aware that one could set other constants as well
set return to "
"
set space to " "
set tab to space & return
and so it goes.
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.
Contrast it with this:
-----
local x
try
set x to x + 1
on error
set x to 3
end try
-----
And you can run this last script the way you want. It will always
return 3.
Deivy
_______________________________________________
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