Hinweis:Dieser Abschnitt ist nur in englischer Sprache verfügbar. Wir bitten um Ihr Verständnis.
3.5.1.1.28 Mod
Description
This function returns the integer modulus (the remainder from division) of integer n divided by integer m, which is denoted by formula
where
is the integer of
round toward 0.
Seeking the functionality of MS Excel's mod function, please use mod2.
Syntax
int mod(int n ,int m)
Parameter
n
- is the dividend.
m
- is the divisor.
Return
Returns the integer modulus of integer n divided by integer m.
Example
aa = mod(5, 3); aa = ; //should return 2 ab = mod(5, -3); ab = ; //should return 2 bb = mod(-5, 3); bb = ; //should return -2