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


Chapter 3 Tools : REMAINDER

REMAINDER
Returns the remainder from dividing the dividend by the divisor. (F)
Invocation
number = REMAINDER(dividend, divisor)
 
Usage Notes
The values for both dividend and divisor must be positive.
The function MOD calls REMAINDER and handles negative dividends and divisors.

Exceptions
 
Example
The following rule determines the remainder of a division operation and prints it to the message log:

 
REMAINDER_1;
_ LOCAL DIVIDEND, DIVISOR, NUMBER;
_ ------------------------------------------------------------------------
_ ------------------------------------------------------------+-----------
_ DIVIDEND = 131313; | 1
_ DIVISOR = 67; | 2
_ NUMBER = REMAINDER(DIVIDEND, DIVISOR); | 3
_ CALL MSGLOG('THE REMAINDER IS: ' || NUMBER); | 4
_ ------------------------------------------------------------------------

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

 
-------------------- INFORMATIONAL MESSAGE LOG ------------------
COMMAND ===> SCROLL ===> P
THE REMAINDER IS: 60

 

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