Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

VBScript Round Function

Returns a number rounded to a specified number of decimal places.

Syntax: VBScript Round Function

Round(expression[, numdecimalplaces])

Arguments: VBScript Round Function

expression

A numeric expression being rounded. Required.

numdecimalplaces

A number indicating how many places to the right of the decimal are included in the rounding. If omitted, integers are returned by the Round function. Optional.

Remarks: VBScript Round Function

The following example uses the Round function to round a number to two decimal places:

Dim MyVar, pi

pi = 3.14159

MyVar = Round(pi, 2) ' MyVar contains 3.14.

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.