Issue
Use Modulus in Menta Expression Block.
Environment
- Xenta programmables
- Xenta 280, 281, 282, 283, 300, 301, 302, 401, 401:B
- Menta
Cause
The Modulus operation in Menta is used to obtain the remainder of a division. If for example you want to perform 10 Modulus 7 the result would be 3.
Resolution
To perform this function in Menta, use an expression block with the contents of A%B.
However, the built in Modulus function does not work with numbers larger than 65535. To perform the Modulus function with such large numbers, write out the Modulus calculation in the expression block instead of using the % symbol. This expression accomplishes the same thing:
A-(B*INT(A/B))