On Fri, Apr 17, 2009 at 21:35, Brian <brian5432...@yahoo.co.uk> wrote:
snip
> LOL, I didn't understand any of that. :-)
> Apart from the last sentence ;-)
snip

Think of a clock, they hands can go around as many times as you like
but they can never point to anything higher than 12.  Modulus works
the same way, the second value acts as a cap:

0 % 4 = 0
1 % 4 = 1
2 % 4 = 2
3 % 4 = 3
4 % 4 = 0
5 % 4 = 1
6 % 4 = 2
7 % 4 = 3
8 % 4 = 0

It is really the remainder of the division: 7/4 = 1 plus a remainder of 3.


-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to