Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: water235 on September 29, 2014, 07:01:16 PM
-
Just that I m curious, is there anyway I could perform a modulo operation in IRD,
like
1. get a count
2. if count >12, perform count%12, and set it to be the value of count, and perform further routing >
Thanks for any pointers/help
-
IRD "by default" uses language where there is no built in modulo operation.
Instead when working with integer types (variables of type INTEGER) it generates "integer ariphmetic" "machine instructions", so X mod Y is the same as X - (X/Y)*Y or something like count= count - (count/12)*12
-
Thanks, this is much easier.
I did it by another way -
i did a sequencial subtraction(dividend = divend - divisor) until divisor is less or lesser than equal to dividend, increasing the quotient count by 1!
in the end reminder = dividend, there by obtaining the quotient and reminder!