Navigation:  Reference > Functions >

Round()

Print this Topic Previous pageReturn to chapter overviewNext page

 

ROUND(1,2)

 

PURPOSE

This function will return an N type value rounded up to a specified number of decimal characters. This is considered simple rounding. Not to be confused with bankers rounding.

 

PARTS

1 f/c/eRequired - The N type field value.  The original value is unchanged.

 

2 f/c/eThe number of significant decimal characters to keep.  This cannot be more than 8.  If the number specified is more than the defined value for the field being rounded, there will be no effect.  Default value is 0.

 

RETURN TYPE - N

The number of decimal characters of the receiving field is unchanged; only the value is affected.

 

EXAMPLE

define n type n size 6 dec 2

n = round(29.3251,2)

// n = 29.33

 

n = round(29.3247,2)

// n = 29.32

 

n = round(29.775,0)

// n = 30.000

 

n = 2.5

n = round(2.5,0)

//n = 3.00

 

 

 


Page url: http://www.cassoftware.com/tas/manual/round().htm