Click to Rate and Give Feedback
Collapse All/Expand All Collapse All
This page is specific to
.NET Framework 3.0

Other versions are also available for the following:
JScript
toPrecision Method (Windows Scripting - JScript)

Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.

numObj.toPrecision ([precision])
numObj

Required. A Number object.

precision

Optional. Number of significant digits. Must be in the range 1 – 21, inclusive.

For numbers in exponential notation, precision - 1 digits are returned after the decimal point. For numbers in fixed notation, precision significant digits are returned.

If precision is not supplied or is undefined, the toString method is called instead.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker