Difference between revisions of "ROUND()"

From Lianjapedia
Jump to: navigation, search
 
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to return rounded numeric
 
Function to return rounded numeric
 
  
 
==Syntax==
 
==Syntax==
 
ROUND(<expN1> [,<expN2>])  
 
ROUND(<expN1> [,<expN2>])  
 
  
 
==See Also==
 
==See Also==
 
[[CEILING()]], [[FLOOR()]], [[INT()]], [[LENNUM()]], [[SET DECIMALS]], [[SET FIXED]], [[TRANSFORM()]]
 
[[CEILING()]], [[FLOOR()]], [[INT()]], [[LENNUM()]], [[SET DECIMALS]], [[SET FIXED]], [[TRANSFORM()]]
 
  
 
==Description==
 
==Description==
 
The ROUND() function rounds the numeric expression <expN1> to <expN2> decimal places.  If <expN2> is omitted then it is taken as zero.  If the SET FIXED command is ON, <expN2> can not be greater than the number of decimal places specified by the SET DECIMALS command.
 
The ROUND() function rounds the numeric expression <expN1> to <expN2> decimal places.  If <expN2> is omitted then it is taken as zero.  If the SET FIXED command is ON, <expN2> can not be greater than the number of decimal places specified by the SET DECIMALS command.
 
  
 
==Example==
 
==Example==
Line 24: Line 20:
 
       3.47
 
       3.47
 
</code>
 
</code>
 
  
 
==Products==
 
==Products==
Recital, Recital Server
+
Lianja, Lianja Server
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:Numeric Data]]
 
 
[[Category:Numeric Data Functions]]
 
[[Category:Numeric Data Functions]]

Latest revision as of 09:12, 4 February 2013

Purpose

Function to return rounded numeric

Syntax

ROUND(<expN1> [,<expN2>])

See Also

CEILING(), FLOOR(), INT(), LENNUM(), SET DECIMALS, SET FIXED, TRANSFORM()

Description

The ROUND() function rounds the numeric expression <expN1> to <expN2> decimal places. If <expN2> is omitted then it is taken as zero. If the SET FIXED command is ON, <expN2> can not be greater than the number of decimal places specified by the SET DECIMALS command.

Example

? round(3.467)
      3.00
? round(3.467,1)
      3.50
? round(3.467,2)
      3.47

Products

Lianja, Lianja Server