Re: Coercing Numbers
Re: Coercing Numbers
- Subject: Re: Coercing Numbers
- From: Michelle Steiner <email@hidden>
- Date: Fri, 26 Feb 2010 13:33:19 -0700
On Feb 26, 2010, at 1:01 PM, Oakley Masten wrote: I can't find the answer to this and don't know where else to look.
set x to 24.95 * 100 --> x = 2495.0
set x to 124.95 * 100 --> x = 1.2495E+4
set x to 124.95 * 100 as integer
This works, though, only when the result of the multiplication is an integer. For instance, this returns a false result:
set x to 124.956 * 100 as integer
The correct answer is 12495.6, but the script returns 12396.
-- Michelle
-- "I'll do the best I can do because that's the best I can do!"
|
_______________________________________________
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