• 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: Basic casting question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Basic casting question


  • Subject: Re: Basic casting question
  • From: Paul Berkowitz <email@hidden>
  • Date: Mon, 02 Mar 2009 15:39:05 -0800
  • Thread-topic: Basic casting question

On 3/2/09 3:06 PM, "Scott Babcock" <email@hidden> wrote:

> If you're converting numeric strings that always use the period as a decimal
> separator, the most straightforward way to avoid local-format issues is to use
> the 'run script' event from Standard Additions:
>
>     set myString to "339.700012"
>     set myFloat to (run script myString)
>
> Just as in normal AppleScript source code, the 'run script' event always
> recognizes the period as the decimal separator, regardless of locale.

Clever.

--
Paul Berkowitz


 _______________________________________________
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: Basic casting question (From: Scott Babcock <email@hidden>)

  • Prev by Date: RE: Basic casting question
  • Next by Date: RE: question to MS Word 2008 scripters..
  • Previous by thread: RE: Basic casting question
  • Next by thread: question to MS Word 2008 scripters..
  • Index(es):
    • Date
    • Thread