Rounds the value of a numeric variable.

NewNumber := ROUND(Number [, Precision] [, Direction])



Type: Decimal

The number that you want to round.


Type: Decimal

This optional parameter determines the precision used when rounding. If you do not specify a Precision parameter, then the following steps are used to specify the precision:

  1. The function ReadRounding in Codeunit 1, Application Management, is called. ReadRounding returns a decimal value that is the precision. By default, the ReadRounding function returns the Amount Rounding Precision field from the GLSetup table.

  2. If you have customized Codeunit 1 and it does not implement the ReadRounding function, then the No. of digits after decimal in the Regional and Language Options on the current computer is used to specify the precision. If the No. of digits after decimal does not specify a valid value, then the precision is specified as 2 digits after the decimal.


Type: Text or Code

This optional parameter specifies how to round the Number parameter. The default rounding method is '='. The following are the options for rounding:

  • '=' rounds up or down to the nearest value (default). Values of 5 or greater are rounded up. Values less than 5 are rounded down.

  • '>' rounds up

  • '<' rounds down

Expand imageProperty Value/Return Value

Expand imageExample

Expand imageSee Also