imod(X;Y)

Returns the remainder after dividing one integer value by another. The result is an integer data type.

Syntax

imod(X;Y)

Input

Argument Type Description
X integer The dividend of the integer modulo operation
Y integer The divisor of the integer modulo operation

Note(s): X and Y must be 32-bit integers (between -2147483646 and +2147483646).

Return Value

Returns the remainder of dividing X by Y. The result is an integer data type.

If the values of X or Y are N/A, they are handled according to their internal representation like any other number.

Example

In this example, the imod(X;Y) function returns the result of g modulo 2 on the pub.demo.baseball.postpitching table. The new column contains integer data type values.

<base table="pub.demo.baseball.postpitching"/>
<colord cols="lahmanid,year,team,g"/>
<willbe name="result" value="imod(g;2)"/>