Documentation Comments
Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.
RealityV15.1Online Documentation (MoTW) Revision 7
ROUND Function (DataBasic) (m618703+round_f.htm)
Rounds a numeric value to the specified number of decimal places.
ROUND(x, y)
x is a numeric variable or string.
y is the number of decimal places that will be retained after the rounding takes place.
ROUND rounds it's argument up or down to the nearest value with the specified number of decimal places. For positive numbers it rounds 5 up. Negative numbers are rounded as if they were positive, but the sign is retained.
If the number of decimal places exceeds the current precision, ROUND will only affect numbers which have not already been shortened by operations determined by the PRECISION statement. See also the TRUNC function.
A = 125.3456
B = ROUND(A,2)
PRINT B
prints 125.35.
X = 3.50
Y = ROUND(X,0)
PRINT Y
prints 4.