$FUNCNAME$
  ROUND()
$CATEGORY$
  NUMERIC
$SUMMARY$
   Return a numeric value rounded to a specified number of digits
$LANG_RU$
          .
$SYNTAX$
     ROUND(<nNumber>, <nDecimals>) --> nRounded
$LANG_RU$
     ROUND(<>, < >) -->  
$ARGUMENTS$
     <nNumber> is the numeric value to be rounded.
     <nDecimals> defines the number of decimal places to retain.
     Specifying a negative <nDecimals> value rounds whole number digits.
$LANG_RU$
     <> -  .
     < > -    , 
       .    
     < >      .
$RETURNS$
     ROUND() returns a numeric value.
$LANG_RU$
     ROUND()   .
$DESCRIPTION$
     ROUND() is a numeric function that rounds <nNumber> to the number of
     places specified by <nDecimals>.  Specifying a zero or negative value
     for <nDecimals> allows rounding of whole numbers.  A negative
     <nDecimals> indicates the number of digits to the left of the decimal
     point to round.  Digits between five to nine (inclusive) are rounded up.
     Digits below five are rounded down.

     The display of the return value does not obey the DECIMALS setting
     unless SET FIXED is ON.  With SET FIXED OFF, the display of the return
     value contains as many decimal digits as you specify for <nDecimals>, or
     zero, if <nDecimals> is less than one.
$LANG_RU$
     ROUND() -  ,    
       ,   < >.
             
      .

        < >  
         ,    
     .

       5  9     . 
       -  .

             
     SET DECIMALS   ,  SET FIXED    ON. 
      SET FIXED OFF    , 
       < >,    , 
       < >  1.
$EXAMPLES$

       These examples round values with decimal digits:

	SET DECIMALS TO 2
	SET FIXED ON
	//
	? ROUND(10.4, 0)                     // Result: 10.00
	? ROUND(10.5, 0)                     // Result: 11.00
	? ROUND(10.51, 0)                    // Result: 11.00
	? ROUND(10.49999999999999, 2)        // Result: 10.50

       These examples use a negative <nDecimals> argument to round
	numeric values to whole number values:

	? ROUND(101.99, -1)                  // Result: 100.00
	? ROUND(109.99, -1)                  // Result: 110.00
	? ROUND(109.99, -2)                  // Result: 100.00


$LANG_RU$

             :

       SET DECIMALS TO 2
       SET FIXED ON
       //
       ? ROUND(10.4, 0)                // : 10.00
       ? ROUND(10.5, 0)                // : 11.00
       ? ROUND(10.51, 0)               // : 11.00
       ? ROUND(10.49999999999999, 2)   // : 10.50

           < > 
          :

       ? ROUND(101.99, -1)             // : 100.00
       ? ROUND(109.99, -1)             // : 110.00
       ? ROUND(109.99, -2)             // : 100.00


$SEEALSO$
  STR(),VAL(),INT()
$END$
