![]() |
![]() |
![]() |
![]() |
![]() |
The keyword mod belongs to the family of the arithmetic operators. It operates on two operands of integer type and on its derivates. The operation x mod y computes the rest that remains from an integer division of x by y.
Related keywords:
mod |
Example:
for (var integer j:=-3; j<=3; j:= j+1) {
   var integer vl_log := (j mod 3);
   log (vl_log)
}
The log will contain the following integer values: 0 1 2 0 1 2 0.
BNF definition of mod