ARR

Contents


arr rounds a number to the next nearest number.

 

Syntax

  arr( exp_num1, exp_num2 )

 

Parameters

Element

Description

Restrictions

exp_num1

Numerical expression

None.

exp_num2

Numerical expression

None.

Examples

   # tax calculation (Swiss -> rounded to 5 centimes)
    INCTAX = arr ( EXTAX * (1+RATE/100), 0.05 )

 

Description and comments

arr(X,Y) returns:
int(X/Y+0.5)*Y if Y is non null,
X if Y is null.

The result is a Decimal type.

 

Associated errors

Error

Description

ERMODE (10)

One of the arguments is not a numerical type.

 

Associated key words

INT - AR2 - FIX


CONTENTS


Copyright © Sage 1999 - 2007