ROUND
Syntax
![]()
Command
Mandatory parameter Optional parameter Mandatory keyword Optional keyword |
ROUND (<Value>[, <Length>, <Decimals>])
Description
Rounds the numeric value specified in <Value>.
Diagram
Returned value type
Numeric
Parameters
Parameter | Description |
<Value> | Expression giving a numeric value. |
<Length> | The length for the <Value>. |
<Decimals> | The number of decimals for the <Value>. |
Remarks
The <Length> and <Decimals> parameters are mandatory if the ROUND instruction is used inside an expression.
In an assignment, these parameters may be omitted if the expression only contains a ROUND instruction. The rounding will then depend on the length and decimal properties that are set for the <Target>.
Examples
perc_merchant := round ((sn-totalmerchant / sn-totalbsl) * 100, 5, 2)
sn-discount := round (perc-discount / 100)
sn-discount := round (perc-discount / 100)