On 23-Nov-00 Christoph Grein wrote: > -14 mod 5: > > There's a common rule: ("Punkt vor Strich" in German) multiplication > (* / mod > rem) before addition (+ -), thus this is > > -14 mod 5 = -2**2 > > You wouldn't fall into the latter trap, would you? > > (Hope I'm correct, did not look it up in ARM :-) Sorry, but "mod x" always delivers values between 0 and x (x excluded). So the result is 1 and not -4. I do like this rule of operation, because adding or subtracting a multiple of the right operand to the left one will not change the result of the operation. It would be nice to have a corresponding division, such that A = (A / B) * B + A mod B. But the Ada definition of integer division is different -- I don�t know why -- and so we need "rem" instead of "mod" to make the above equation (and the one You have given) true. Wilhelm