Div
Syntax: Div(integer1, integer2)
Arguments:
- integer1 is an integer.
- integer2 is an integer.
Return Type: Integer
Description: Divides integer1 by Integer2. If integer2 is not 0, the function returns the integer portion of the quotient. If integer2 is 0, the function returns 0.
The Div function is distinct from the division operator (/). Div never returns a remainder value whereas the division operator returns the precise quotient.
Example:
Div(8,5) = 1
The solution to 8 divided by 5 is 1 with a remainder of 3, or 1.6. The division operator would return the value 1.6, but the Div function returns the value 1.