HP 3000 Manuals

ROUND [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation


HP Business BASIC/XL Reference Manual

ROUND 

The ROUND function rounds a number to a specified power of 10.  The
result is of type DECIMAL.

Syntax 

ROUND(n1[,n2])

Parameters 

n1               The number to be rounded.  This is of type DECIMAL.

n2               The power of 10 that n1 is to be rounded to.  If n2 is
                 not specified, 0 is the default.

Examples 

     10 A = ROUND(32767,2)    !A = 32800
     20 B = ROUND(32067,3)    !B = 32000
     30 C = ROUND(5.07,0)     !C = 5
     40 D = ROUND(5.07)       !D = 5
     50 E = ROUND(5.07,-1)    !E = 5.1



MPE/iX 5.0 Documentation