The arithmetic operators include the following set of operators:
As we can see, in the Data Types column, these operators can be used on various data types. Numeric types include Integer, Decimal, Boolean, and Character data types. Text and Code are both String data.
Sample statements using DIV and MOD are shown in the following code, where BigNumber is an integer containing 200:
DIVIntegerValue := BigNumber DIV 60;
The contents of DIVIntegerValue, after executing the preceding statement, will be 3:
MODIntegerValue := BigNumber MOD 60;
The contents of MODIntegerValue, after executing the preceding statement, will be 20.
The syntax for these DIV and MOD statements is as follows:
IntegerQuotient := IntegerDividend DIV IntegerDivisor; IntegerModulus := IntegerDividend MOD IntegerDivisor;