Titan



rem


The keyword rem belongs to the family of the arithmetic operators. It operates on two operands of integer type and on its derivates. The operation x rem y computes the rest that remains from an integer division of x by y. 

Related keywords:


rem


Example:

for (var integer j:=-3; j<=3; j:= j+1) {
   var integer vl_log := (j rem 3);
   log (vl_log)
}

The log will contain the following integer values: 0 -2 -1 0 1 2 0.



BNF definition of rem