The ECMA standard defines some limits for numeric values and the conditions under which it should evaluate numeric values according to the IEEE 754 standard behavior.
The standard provides for the implementation to support some enquiry functions so you can determine these limits.
The IEEE 754 computation logic further provides for error conditions to be handled gracefully by supplying not a number (NaN) values, infinity and undefined values in cases where a computation would normally generate a domain error and possibly crash the application.
If JavaScript did not provide such a forgiving environment in which to execute scripts, it is likely that some of the most trivial script errors would result in the hosting environment crashing. In the context of a web browser you would lose the session and have to restart the browser. On a desktop platform, this could be fatal to the OS and you might have to reboot the machine.
See also: | Limits, Range error, Type conversion |
Prev | Home | Next |
MimeTypeArray.length | Up | Minus (-) |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |