2.5.4.114 Trunc
The Trunc function performs a truncation operation.
ABNF:
-
Trunc = val val " TRUNC():128"
Required Arguments:
Name: Number
Type: vDouble
An argument that specifies the number to truncate.
Name: Digits
Type: vSignedInt
An argument that specifies the decimal place to use for the truncation operation.
Return Value:
Type: vNum
This function returns a vNum containing the truncated value of Number, as described by the following table.
Condition |
Result |
---|---|
Digits > 0 |
The function returns Number truncated to Digits places to the right of the decimal point. |
Digits = 0 |
The function returns Number truncated to an integer. |
Digits < 0 |
The function returns Number truncated 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.