Navigation
Synopsis Remainder of two integer values.
Syntax Exp1 % Exp2
Types
Exp1 Exp2 Exp1 % Exp2
int int int
Description Yields the remainder when dividing the of Exp1 by the value of Exp2.
Examples
rascal>12 % 5
int: 2
rascal>12 % 6
int: 0
Pitfalls Remainder is only defined on integers:
rascal>13.5 % 6
|stdin:///|(7,1,<1,7>,<1,8>): remainder not supported on real and int

Questions
Question [1].
The type of 9 % 19 is

Question [2].
13 % 0 == 



Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.