Futurebasic/Language/Reference/usr round

SyntaxEdit

USR ROUND

USR ROUNDUP

USR ROUNDDOWN

DescriptionEdit

ROUND

Rounds the specified numericExpression to a whole number using the rounding rule (where .5 and higher are rounded up and lower values are rounded down).

ROUNDUP

Rounds the specified numericExpression to the next whole number.

ROUNDDOWN

Rounds the specified numericExpression down to the nearest whole number. This is the same as FIX Example: DIM i#

FOR i = 1 TO 2 STEP 0.1

 PRINT i#,USR ROUNDDOWN(i#),USR ROUND(i#),USR ROUNDUP(i#)

NEXT output:

 1111
 1.1112
 1.2112
 1.3112
 1.4112
 1.5122
 1.6122
 1.7122
 1.8122
 1.9122

See AlsoEdit

ABS; FIX; FRAC; INT