rem
-
operator
-
The rem (remainder) operator, yields the integer remainder of an integer division (div) operation. This is intended as a more obvious and more consistent substitute for the old mod operator. The rem operator will round any non-integer values to the nearest integer before calculating the remainder. The modulo or mod operator produces the same results in the most common cases, but returns different results when one of its operands is negative, and can work with non-integer values.
-
Examples: +
put 8 rem 5 —> 3
-
Related: div, modulo