VBScript Round Function
Complete VBScript Reference
The Round function rounds a number.
Syntax
Round(expression[,numdecimalplaces])
|
Parameter |
Description |
expression |
Required. The numeric expression to be rounded |
numdecimalplaces |
Optional. Specifies how many places to the right of the
decimal are included in the rounding. Default is 0 |
Example 1
dim x
x=24.13278
document.write(Round(x))
Output:
24
|
Example 2
dim x
x=24.13278
document.write(Round(x,2))
Output:
24.13
|
Complete VBScript Reference
Learn XML with <oXygen/> XML Editor - Free Trial!
|
|
oXygen helps you learn to define,
edit, validate and transform XML documents. Supported technologies include XML Schema,
DTD, Relax NG, XSLT, XPath, XQuery, CSS.
Understand in no time how XSLT and XQuery work by using the intuitive oXygen debugger!
Do you have any XML related questions? Get free answers from the oXygen
XML forum
and from the video
demonstrations.
Download a FREE 30-day trial today!
|
|