Modulus Operator (%)

The modulus operator finds the remainder after dividing the first operand by the second. If the operands are a and b, then the modulus operator can be defined thus:

a % b  === a - (a / b) * b

If the second operand is zero, then a runtime error occurs and XJEase execution is halted.

Example

INT a, b, c;
a := 10;
b := 3;
c := a % b;   // c = 1