Graham-

Tuesday, June 24, 2014, 11:02:56 AM, you wrote:

> I get a result, "nan", and the catch doesn't fire. Why not? Maybe
> someone can explain what the engine is doing here - or is it just an
> obscure bug?

It fires for me in either case.
To get the actual error code, change the code to

try
  put value(fld "myField") into testResult
catch e
  answer e
  exit mouseUp
end try

That way you see that sqrt(-1) results in 555 "sqrt: domain error" and
(-8)^(2/3) results in 402 "pow: range error (overflow)". Both of them
also return "-nan", as expected.

-- 
-Mark Wieder
 ahsoftw...@gmail.com

This communication may be unlawfully collected and stored by the National 
Security Agency (NSA) in secret. The parties to this email do not 
consent to the retrieving or storing of this communication and any 
related metadata, as well as printing, copying, re-transmitting, 
disseminating, or otherwise using it. If you believe you have received 
this communication in error, please delete it immediately.


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to