• 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: How can I format an integer ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I format an integer ?


  • Subject: Re: How can I format an integer ?
  • From: Luther Fuller <email@hidden>
  • Date: Sun, 26 Oct 2008 09:41:56 -0500

On Oct 26, 2008, at 9:19 AM, Emile Schwarz wrote:
I noticed:
set AppleScript's text item delimiters to {theSeparatorString}

but no storage (for restore) and no restore at all of the original value.


I learned to store a variable (that I am not the owner) before changing its contents and restore it before quit. The variable owner is either AppleScript or Mac OS X and I do not know what happens once it have been changed by a program. So to avoid trouble(s), I usually store the original value before changing it and restore that original value once I can (do not need my value).

Am I right ?

I never store/restore the original value of AppleScript's text item delimiters. Never!
So ... whose right? Both of us. You can do it either way.


My usage is to always assume that the value of TIDs is undefined and I define it just before I use it. It's easier to read the code because I can easily see the value I'm using. And doing it this way avoids writing unnecessary lines of code to store/restore the value of TIDs.

There may be a problem if my code calls code written by someone else who incorrectly assumes the value of TIDs. Could there be a problem if there are two independent AppleScripted applications running at the same time. I think we may have discussed this here some time ago, but I forget the details.

_______________________________________________
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
References: 
 >Re: How can I format an integer ? (From: Emile Schwarz <email@hidden>)

  • Prev by Date: Now, I have “Left(StringSource, CharCount)” and “Right(StringSource, CharCount)”
  • Next by Date: Re: AppleScript strings fail
  • Previous by thread: Re: How can I format an integer ?
  • Next by thread: AppleScript strings fail
  • Index(es):
    • Date
    • Thread