% (remainder) operator
The binary, left-associative infix
% operator is used to get the remainder of an
Integer two = 5 % 3;
% operator is defined as follows:
See the language specification for more details.
The result type of the
% operator is the same as the type of its right hand operand.
Meaning of remainder for built-in types
For the built-in numeric type
% computes normal mathematical remainder.
Since the other built-in numeric types do not satisfy
remainder operator cannot be used on them.