From: dmcnulty@... (Dan McNulty) Date: 2002-03-01T04:38:47+09:00 Subject: Correct use of % (modulus) operator? Coming from a C background, I expected "%" to yield a remainder. But the code: print "4 mod 2: ", 4.0 % 2.0, "\n" print "5 mod 2: ", 5.0 % 2.0, "\n" gives me: 4 mod 2: 0.0 5 mod 2: 1.0 I was expecting a result of "0.5" for 5 % 2, as 5.0 / 2.0 = 2.5 This isn't covered very well in the books I have, nor can I find much on the 'net. I obviously have missed something rather fundamental. -- Dan