AMT Help Files

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) * 10052)
    
sn-discount := round (perc-discount / 100)

 

Return to

Commands