Re: Basic casting question
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