Operator Mod (Modulus)


Finds the remainder from a division operation

Syntax:
Usage:
result = lhs Mod rhs

Parameters:
lhs
The left-hand side dividend expression.
rhs
The right-hand side divisor expression.

Return Value:
Returns the remainder of a division operation.

Description:
Operator Mod (Modulus) divides two Integer expressions and returns the remainder. Float numeric values are converted to Integer by rounding up or down.

Neither of the operands are modified in any way.

This operator can be overloaded for user-defined types.

Examples:
Print 47 Mod 7
Print 5.6 Mod 2.1
Print 5.1 Mod 2.8

Output:
5
0
2


This is because:
Dialect Differences:
Differences from QB:
See also:
Back to Arithmetic Operators
Back to Operators
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode