ROUND
Convert a number to the closest INTEGER value.
WebVue support - Yes.
Syntax
DblVal = ROUND(Num);
Return type: DOUBLE.
Argument |
Meaning |
Num |
The value to be converted. Any numeric type. |
Execution
The number is rounded to the nearest INTEGER value. If the fractional part is exactly 0.5, the result is rounded away from zero (towards the higher absolute value).
Example
Copy
SUB Main()
DIM dblValue AS Double
DIM dblResult AS Double
dblValue = 125.7
dblResult = Round(dblValue)
PRINT("Rounded Result: ", dblResult)
'Display "Rounded Result: 126"
END SUB