Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Tools : ROUND

ROUND
Returns the specified value rounded to the nearest integer. (F)
Invocation
number = ROUND(value)
 
On return, contains the number rounded to the nearest integer. Its syntax is B (binary) with length either 4 or 12.

Exceptions
 
Example
The following rule rounds a number and prints the original number and the rounded number to the message log:

 
ROUND_1;
_ LOCAL SOURCE_NUM, ROUNDED_NUM;
_ ------------------------------------------------------------------------
_ ------------------------------------------------------------+-----------
_ SOURCE_NUM = 1234.5678; | 1
_ ROUNDED_NUM = ROUND(SOURCE_NUM); | 2
_ CALL MSGLOG('THE ROUNDED NUMBER IS: ' || ROUNDED_NUM); | 3
_ CALL MSGLOG('THE SOURCE NUMBER IS STILL: ' || SOURCE_NUM); | 4
_ ------------------------------------------------------------------------

 
Resulting Output
Pressing PF2 after executing this rule displays the following:

 
----------------------- INFORMATIONAL MESSAGE LOG ---------------------
COMMAND ===> SCROLL ===> P
THE ROUNDED NUMBER IS: 1235
THE SOURCE NUMBER IS STILL: 1234.5678

 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved