Re: String to real conversion question
Re: String to real conversion question
- Subject: Re: String to real conversion question
- From: Michelle Steiner <email@hidden>
- Date: Sun, 2 May 2010 09:43:25 -0700
On May 2, 2010, at 9:35 AM, Bert Groeneveld wrote: -- Don't know if this is the smartest way for a find and replace action, but here's how I worked around it . . .
set x to "0.25" -- string set y to "4" -- string
if x contains "." then set AppleScript's text item delimiters to "." set x to every text item of x as list set AppleScript's text item delimiters to "," set x to x as string set AppleScript's text item delimiters to "" end if set z to x * y --> 1.0
But what if x is greater than one thousand, and is formatted something like "2,341.25"?
-- Michelle --
A great Idea! That's what we need--a great idea. --Pseudolus, (A Funny Thing Happened on the way to the forum)
|
_______________________________________________
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