MODULO operator
- Last Updated: March 6, 2024
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
Determines the remainder after division.
Syntax
|
- expression
- An integer expression. If the expression could result in a decimal value, then that value will be rounded before the MODULO operation occurs. This may or may not produce a result that is sensible for your business logic. For code readability, such an expression should be explicitly converted to an integer expression with attention to whether or not a rounded or truncated integer is correct for your application. See the INTEGER, ROUND, and TRUNCATE functions
- base
- A positive integer expression that is the modulo base. For example, angles measured in degrees use a base of 360 for modulo arithmetic. 372 MODULO 360 is 12.
Example
This procedure determines the number of trucks required to ship a given quantity of material, and how much material is left over from a less than full truck load:
r-modulo.p
|