M
Michel Walsh
Mathematically, r = a modulo b (b being the divisor) is defined such
that if b <> 0, and if r <>0, its sign should be the sign of b.
C# does not follow this definition.
int indx = -1;
indx %= 100;
will let indx == -1, not == 99 as it should (mathematical definition).
Is that "by specification"? and if so, is there an alternate predefined
'modulo' operator which behaves like the mathematical definition?
Thanks for your time,
Vanderghast, Access MVP
that if b <> 0, and if r <>0, its sign should be the sign of b.
C# does not follow this definition.
int indx = -1;
indx %= 100;
will let indx == -1, not == 99 as it should (mathematical definition).
Is that "by specification"? and if so, is there an alternate predefined
'modulo' operator which behaves like the mathematical definition?
Thanks for your time,
Vanderghast, Access MVP