[D1] modulo on neg integer

qwerty qw at er.ty
Thu Mar 18 05:00:51 PDT 2010

If memory serves me right, module is undefined on negative integers.
int i = -2;
i%=10; // i=undefined?
What should I use instead to get i definitely equal to 7? 

On a sidenote, where can I read about operation order/definitions?
Like i++, ++i and i%10 not changing i etc. 

More information about the Digitalmars-d-learn mailing list