2.5.4.87 Round

The Round function performs a rounding calculation.

ABNF:

Round = val val " ROUND():128"

Required Arguments:

Name: Number

Type: vDouble

An argument that specifies the number to round.

Name: Digits

Type: vSignedInt

An argument that specifies the decimal place to use for the rounding operation.

Return Value:

Type: vNum

This function returns a vNum containing the rounded value of Number, as described by the following table.

Condition

Return value

Digits > 0

The function returns Number rounded to Digits places to the right of the decimal point.

Digits = 0

The function returns Number rounded to an integer.

Digits < 0

The function returns Number rounded to negative Digits places to the left of the decimal point.

The unit of the return value is equal to the unit of Number. If Digits is less than -308 or greater than 15, the function returns Number.