| **Navigation:**  [[introduction.htm|Language Reference]] > 13 - Built-in Functions >====== ROUND (return rounded number) ====== | [[rollback terminate unsuccessful transaction .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[roundbox draw a box with round corners .htm|{{btn_next_n.gif|Next page}}]] | | || **ROUND(**//expression//,//order//**)** {{blk2blue.jpg|blk2blue.jpg}} | **ROUND** | Returns rounded value. | | //expression// | A numeric constant, variable, or expression. | | //order// | A numeric expression with a value equal to a power of ten, such as 1, 10, 100, 0.1, 0.001, etc. If the value is not an even power of ten, the next lowest power is used; 0.55 will use 0.1 and 155 will use 100. | The **ROUND** procedure returns the value of an //expression// rounded to a power of ten. If the //order //is a LONG or DECIMAL Base Type, then rounding is performed as a BCD operation. Note that if you want to round a real number larger than 1³°, you should use ROUND(num,1.0e°), and not ROUND(num,1). The ROUND procedure is very efficient ("cheap") as a BCD operation and should be used to compare REALs to DECIMALs at decimal width. **Return Data Type:     **DECIMAL or REAL **Example:** ** !ROUND(5163,100)     returns 5200** ** !ROUND(657.50,1)     returns 658** ** !ROUND(51.63594,.01) returns 51.64** **Commission = ROUND(Price / Rate,.01)  !Round the commission to the nearest cent** **See Also:** [[bcd operations and procedures.htm|BCD Operations and Procedures]]