Re: JSA -- now I believe this is a bug (JSA or AS)
Re: JSA -- now I believe this is a bug (JSA or AS)
- Subject: Re: JSA -- now I believe this is a bug (JSA or AS)
- From: has <email@hidden>
- Date: Thu, 18 Dec 2014 16:06:43 +0000
Deivy Petrescu wrote:
> set k to run script "Math.tan((Math.PI)/3)" in “_javascript_”
> Result: 1
>
> the problem happens with all trig functions.
It has nothing to do with JS Math functions:
run script "1.6" in "_javascript_"
--> 1
JXA's OSACoerceToDesc handler is broken. SE asks JXA to convert the
script's result value to an AEDesc of typeWildCard - i.e. whatever
type JXA thinks most appropriate - and JXA returns an AEDesc of
typeInteger. For a floating point number. With a non-zero fraction.
In a language that doesn't even _have_ integers.
Can't imagine why I keep saying JXA is a broken POS...
has
|
_______________________________________________
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