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

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
  • Follow-Ups:
    • Re: Before I forget
      • From: Axel Luttgens <email@hidden>
  • Prev by Date: Re: File best practice questions
  • Next by Date: Re: Path to Document in Script Editor
  • Previous by thread: Re: Path to Document in Script Editor
  • Next by thread: Re: Before I forget
  • Index(es):
    • Date
    • Thread